Added convenience function for getting a fetch request from an array of fetch request blocks

This commit is contained in:
Blake Watters
2012-10-17 22:34:09 -04:00
parent feb998ea84
commit 68cebc96af
2 changed files with 19 additions and 0 deletions

View File

@@ -169,3 +169,12 @@
@return An `NSFetchRequest` object corresponding to the given URL, or nil if the URL could not be processed.
*/
typedef NSFetchRequest *(^RKFetchRequestBlock)(NSURL *URL);
/**
Returns a fetch request object from an array of `RKFetchRequestBlock` objects given a URL.
@param fetchRequestBlocks An array of `RKFetchRequestBlock` blocks to
@param URL The URL for which to return a fetch request.
@return A fetch request from the first block that matches the URL.
*/
NSFetchRequest *RKFetchRequestFromBlocksWithURL(NSArray *fetchRequestBlocks, NSURL *URL);