Open Source Objective-C Library Providing A Vast Amount Of Ruby-Style Enumerators

A few weeks ago I mentioned a library providing a number of categories to reduce the amount of code required to perform common programming tasks in Objective-C that included a few Ruby style enumerators.

Here is a library called YOLOKit from Max Howell that provides Ruby like enumeration for foundation objects providing some nice features not found in other libraries.

YoloKit provides a vast number of easy to use Ruby style enumerators as categories for NSArray, NSDictionary, NSMutableArray, NSNumber, NSSet, and NSString, and allows you to chain enumerators using a dot style syntax.

Here’s an example showing this chaining syntax in action chaining the reject, pluck, flatten and each methods:

#import "YOLO.h"
#import "YOLO.h"
//…
campaigns.reject(^(PPCampaign *campaign){
    return campaign.locked;
}).pluck(@"venues").flatten.each(^(PPVenue *venue){
    [geofencer startMonitoringForRegion:venue.region];
});

You can find YOLOKit on Github here.

A great library for enumerating Foundation objects.

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Open Source Objective-C Library Providing A Vast Amount Of Ruby-Style Enumerators

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *