class Leeloo::GpgLocalFileSystemSecret
Public Class Methods
new(pathname, name, recipients)
click to toggle source
Calls superclass method
Leeloo::LocalFileSystemSecret::new
# File lib/leeloo/secret.rb, line 68 def initialize pathname, name, recipients super pathname, name @recipients = recipients @crypto = GPGME::Crypto.new :always_trust => true end
Public Instance Methods
read()
click to toggle source
# File lib/leeloo/secret.rb, line 74 def read @crypto.decrypt File.open(@pathname) end
write(phrase)
click to toggle source
# File lib/leeloo/secret.rb, line 78 def write phrase FileUtils.mkdir_p File.dirname @pathname @crypto.encrypt phrase, :output => File.open(@pathname,"w+"), :recipients => @recipients end