Sha256: 5fa281d7978a48f58dc52df48bf083c4ebfa85b82b5b275426e0d737d0ea9e5c
Contents?: true
Size: 477 Bytes
Versions: 38
Compression:
Stored size: 477 Bytes
Contents
# Reopens the NSUserDefaults class to add Array like accessors # @see https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/nsuserdefaults_Class/Reference/Reference.html class NSUserDefaults # Retrieves the object for the passed key def [](key) self.objectForKey(key.to_s) end # Sets the value for a given key and save it right away. def []=(key, val) self.setObject(val, forKey: key.to_s) self.synchronize end end
Version data entries
38 entries across 38 versions & 2 rubygems