davedelong/CHCSVParser — pull request #12 by gvieira (2012-06-25 12:57:33+00:00)
Title: Blocks support

* Solved minor compile issues
* .gitignore file updated
* Turned all delegate methods to optional
* Added delegate method for notifying end of line with an array of fields (it is only fed if somebody actually need it)
* Added blocks as an option for delegating callbacks (non exclusive)
* Added `asyncParse` method for async parsing (!). People can release the parser after calling `asyncParse`, since it uses GCD and its block retains self until the `parse` is running
* Added tests for parsing with blocks

Example:

CHCSVParser *parser = [[CHCSVParser alloc] initWithContentsOfCSVFile:file usedEncoding:nil error:nil];

parser.didEndLine = ^(NSUInteger lineNumber, NSArray *fields) {
//do something with each line
};

[parser asyncParse];
[parser release];