Class: Leeloo::GitSecretDecorator
Instance Method Summary collapse
- #erase ⇒ Object
- #footprint ⇒ Object
-
#initialize(git, secret) ⇒ GitSecretDecorator
constructor
A new instance of GitSecretDecorator.
- #name ⇒ Object
- #read ⇒ Object
- #write(phrase) ⇒ Object
Methods inherited from Secret
Constructor Details
#initialize(git, secret) ⇒ GitSecretDecorator
Returns a new instance of GitSecretDecorator.
89 90 91 92 |
# File 'lib/leeloo/secret.rb', line 89 def initialize git, secret @git = git @secret = secret end |
Instance Method Details
#erase ⇒ Object
112 113 114 115 116 |
# File 'lib/leeloo/secret.rb', line 112 def erase @secret.erase @git.remove @secret.pathname @git.commit "secret #{@secret.name} removed" end |
#footprint ⇒ Object
102 103 104 |
# File 'lib/leeloo/secret.rb', line 102 def footprint @secret.footprint end |
#name ⇒ Object
94 95 96 |
# File 'lib/leeloo/secret.rb', line 94 def name @secret.name end |
#read ⇒ Object
98 99 100 |
# File 'lib/leeloo/secret.rb', line 98 def read @secret.read end |
#write(phrase) ⇒ Object
106 107 108 109 110 |
# File 'lib/leeloo/secret.rb', line 106 def write phrase @secret.write phrase @git.add @secret.pathname @git.commit "secret #{@secret.name} added" end |