Method: Boom::Storage::Keychain#save
- Defined in:
- lib/kaboom/storage/keychain.rb
#save ⇒ Object
Saves the data from memory to the correct Keychain
Returns nothing
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/kaboom/storage/keychain.rb', line 54 def save @lists.each do |list| keychain_name = list_to_filename(list.name) create_keychain_list(keychain_name) unless stored_keychain_lists.include?(keychain_name) unless list.items.empty? list.items.each do |item| store_item(item, keychain_name) end end delete_unwanted_items(list) end delete_unwanted_lists rescue RuntimeError puts(e "Couldn't save to your keychain, check Console.app or above for relevant messages") end |