/nsnulldammit

RubyMotion automatically converts NSNull.null instances to nil making it... difficult to store an NSNull instance. This class and category on NSObject might help!

Primary LanguageObjective-C

Objective-C code that helps you assign [NSNull null] within RubyMotion.

add it to your RubyMotion project
$ git clone git@github.com:colinta/nsnulldammit vendor/nsnulldammit
add it to your Rakefile
app.vendor_project('vendor/nsnulldammit/', :static)
use it!
dict = {}
array = [1,2,3]
person = Person.new

dict.setToNull('key')     # dict['key'] = NSNull.null
array.setIndexToNull(1)   # array[1] = NSNull.null
array.appendNull          # array << NSNull.null
person.setToNull('email') # person.email = NSNull.null