class Leeloo::GitSecretDecorator

Public Class Methods

new(git, secret) click to toggle source
# File lib/leeloo/secret.rb, line 89
def initialize git, secret
  @git = git
  @secret = secret
end

Public Instance Methods

erase() click to toggle source
# File lib/leeloo/secret.rb, line 112
def erase
  @secret.erase
  @git.remove @secret.pathname
  @git.commit "secret #{@secret.name} removed"
end
footprint() click to toggle source
# File lib/leeloo/secret.rb, line 102
def footprint
  @secret.footprint
end
name() click to toggle source
# File lib/leeloo/secret.rb, line 94
def name
  @secret.name
end
read() click to toggle source
# File lib/leeloo/secret.rb, line 98
def read
  @secret.read
end
write(phrase) click to toggle source
# File lib/leeloo/secret.rb, line 106
def write phrase
  @secret.write phrase
  @git.add @secret.pathname
  @git.commit "secret #{@secret.name} added"
end