Method: SafeFile#initialize

Defined in:
lib/safefile.rb

#initialize(password, dir, filename = '.safe.xml') ⇒ SafeFile

Returns a new instance of SafeFile.



52
53
54
55
56
57
58
# File 'lib/safefile.rb', line 52

def initialize(password, dir, filename = '.safe.xml')
  raise "Password must not be blank" unless password
  self.entries = Hash.new
  self.filename = "#{dir}/#{filename}"
  self.password = password
  load
end