Class: Diary::SecureStore

Inherits:
Store
  • Object
show all
Defined in:
lib/diary-ruby/store.rb

Instance Method Summary collapse

Methods inherited from Store

#[], #path, #read, #update_db_timestamp, #write, #write_entry

Constructor Details

#initialize(fname = nil, passphrase = nil) ⇒ SecureStore

Returns a new instance of SecureStore.



69
70
71
72
73
74
75
# File 'lib/diary-ruby/store.rb', line 69

def initialize(fname=nil, passphrase=nil)
  fname ||= DEFAULT_FILENAME
  passphrase ||= DEFAULT_PASSPHRASE

  @path = fname
  @file = ::SecurePStore.new(fname, passphrase: passphrase)
end