lib/PackingPeanut-android/PackingPeanut.rb in PackingPeanut-1.1.0 vs lib/PackingPeanut-android/PackingPeanut.rb in PackingPeanut-1.2.0

- old
+ new

@@ -79,9 +79,24 @@ end merged_hashes end + def delete(key) + settings = get_settings + string_key = key.to_s + editor = settings.edit + editor.remove(string_key) + editor.commit + end + + def delete_all! + settings = get_settings + editor = settings.edit + editor.clear() + editor.commit + end + def get_settings raise "[PackingPeanut] Fatal Error - You must set the context before accessing persistent data." unless @context current_context.getSharedPreferences(storage_file, preference_mode) end