class NSUserDefaults

Reopens the NSUserDefaults class to add Array like accessors @see developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/nsuserdefaults_Class/Reference/Reference.html

Public Instance Methods

[](key) click to toggle source

Retrieves the object for the passed key

# File lib/PackingPeanut-ios/ns_user_defaults.rb, line 6
def [](key)
  self.objectForKey(key.to_s)
end
[]=(key, val) click to toggle source

Sets the value for a given key and save it right away.

# File lib/PackingPeanut-ios/ns_user_defaults.rb, line 11
def []=(key, val)
  self.setObject(val, forKey: key.to_s)
  self.synchronize
end