How do I rewrite:
NSUInteger options = kCFCalendarUnitYear | kCFCalendarUnitMonth | kCFCalendarUnitDay;
To Ruby for Rubymotion?
Thanks :)
Almost the exact same way. The only difference really is that since Ruby requires constants to start with a capital letter, you must use a capital K
instead:
options = KCFCalendarUnitYear | KCFCalendarUnitMonth | KCFCalendarUnitDay
# returns 28, same as in Objective-C.