Class: NestConnect::ConfigStore
- Inherits:
-
Object
- Object
- NestConnect::ConfigStore
- Defined in:
- lib/nest_connect/config_store.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(path) ⇒ ConfigStore
constructor
A new instance of ConfigStore.
- #save(key, value) ⇒ Object
Constructor Details
#initialize(path) ⇒ ConfigStore
Returns a new instance of ConfigStore.
5 6 7 |
# File 'lib/nest_connect/config_store.rb', line 5 def initialize(path) @path = path end |
Instance Method Details
#[](key) ⇒ Object
9 10 11 |
# File 'lib/nest_connect/config_store.rb', line 9 def [](key) data[key] end |
#save(key, value) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/nest_connect/config_store.rb', line 13 def save(key, value) data[key] = value find_or_create_directory find_or_create_file persist_data value end |