motion/core/persistence.rb in bubble-wrap-1.0.0 vs motion/core/persistence.rb in bubble-wrap-1.1.0
- old
+ new
@@ -14,9 +14,16 @@
def [](key)
storage.objectForKey storage_key(key.to_s)
end
+ def merge(values)
+ values.each do |key, value|
+ storage.setObject(value, forKey: storage_key(key.to_s))
+ end
+ storage.synchronize
+ end
+
def storage
NSUserDefaults.standardUserDefaults
end
def storage_key(key)