Created
March 19, 2009 00:30
-
-
Save tomjadams/81502 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + (FKEither *)doParseContent:(NSString *)rssContent { | |
| PXRss20ParserDelegate *parser = [[PXRss20ParserDelegate alloc] initWithContent:rssContent]; | |
| FKEither *maybeItems = [parser.parse.right map:[NSArray liftFunction:[FKFunction functionFromSelector:@selector(parseItem:)]]]; | |
| [parser release]; | |
| return maybeItems; | |
| } | |
| + (PXRss20Item *)parseItem:(NSDictionary *)item { | |
| return [PXRss20Item title:[item objectForKey:@"item"] link:[NSURL URLWithString:[item objectForKey:@"link"]] description:[item objectForKey:@"description"]]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment