Class: Robut::Storage::YamlStore
- Defined in:
- lib/robut/storage/yaml_store.rb
Overview
A store backed by a persistent on-disk yaml file.
Class Attribute Summary collapse
-
.file ⇒ Object
The path to the file this store will persist to.
Class Method Summary collapse
-
.[](k) ⇒ Object
Returns the value at the key
k
. -
.[]=(k, v) ⇒ Object
Sets the key
k
to the valuev
.
Class Attribute Details
.file ⇒ Object
The path to the file this store will persist to.
9 10 11 |
# File 'lib/robut/storage/yaml_store.rb', line 9 def file @file end |
Class Method Details
.[](k) ⇒ Object
Returns the value at the key k
.
27 28 29 |
# File 'lib/robut/storage/yaml_store.rb', line 27 def [](k) internal[k] end |
.[]=(k, v) ⇒ Object
Sets the key k
to the value v
20 21 22 23 24 |
# File 'lib/robut/storage/yaml_store.rb', line 20 def []=(k, v) internal[k] = v persist! v end |