motion/core/persistence.rb in bubble-wrap-1.6.0 vs motion/core/persistence.rb in bubble-wrap-1.7.0
- old
+ new
@@ -41,9 +41,18 @@
end
def storage_key(key)
"#{app_key}_#{key}"
end
+
+ def all
+ hash = storage.dictionaryRepresentation.select{|k,v| k.start_with?(app_key) }
+ new_hash = {}
+ hash.each do |k,v|
+ new_hash[k.sub("#{app_key}_", '')] = v
+ end
+ new_hash
+ end
end
end
::Persistence = BubbleWrap::Persistence unless defined?(::Persistence)