Class: OneSecret::Store

Inherits:
Object
  • Object
show all
Defined in:
lib/one_secret/store.rb

Direct Known Subclasses

ApplicationSecretsStore, EnvStore

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Store

Returns a new instance of Store.



3
4
5
# File 'lib/one_secret/store.rb', line 3

def initialize(hash)
  @hash = hash
end

Instance Method Details

#put(key, value) ⇒ Object



7
8
9
10
# File 'lib/one_secret/store.rb', line 7

def put(key, value)
  decrypted_value = Secret.load(value)
  @hash[key.to_s] = decrypted_value
end