Class: Precursor::OverrideVault
- Defined in:
- lib/override_vault.rb
Overview
Vault that stores data in hash and allows to override config on the fly
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Vault
Instance Method Summary collapse
- #clear(key) ⇒ Object
-
#initialize(hash = {}) ⇒ OverrideVault
constructor
A new instance of OverrideVault.
- #override(key, value) ⇒ Object
Methods inherited from Vault
Constructor Details
#initialize(hash = {}) ⇒ OverrideVault
Returns a new instance of OverrideVault.
8 9 10 |
# File 'lib/override_vault.rb', line 8 def initialize(hash = {}) super(hash) end |
Instance Method Details
#clear(key) ⇒ Object
16 17 18 |
# File 'lib/override_vault.rb', line 16 def clear(key) store.delete(key) end |
#override(key, value) ⇒ Object
12 13 14 |
# File 'lib/override_vault.rb', line 12 def override(key, value) store[key] = value end |