Class: Cranium::Extract::Storage
- Inherits:
-
Object
- Object
- Cranium::Extract::Storage
- Defined in:
- lib/cranium/extract/storage.rb
Constant Summary collapse
- STORAGE_FILE_NAME =
"extracts"
Instance Method Summary collapse
-
#initialize(extract_name) ⇒ Storage
constructor
A new instance of Storage.
- #last_value_of(field) ⇒ Object
- #save_last_value_of(field, value) ⇒ Object
Constructor Details
#initialize(extract_name) ⇒ Storage
Returns a new instance of Storage.
10 11 12 |
# File 'lib/cranium/extract/storage.rb', line 10 def initialize(extract_name) @extract_name = extract_name end |
Instance Method Details
#last_value_of(field) ⇒ Object
16 17 18 |
# File 'lib/cranium/extract/storage.rb', line 16 def last_value_of(field) stored_values[:last_values][field] end |
#save_last_value_of(field, value) ⇒ Object
22 23 24 25 |
# File 'lib/cranium/extract/storage.rb', line 22 def save_last_value_of(field, value) stored_values[:last_values][field] = value save_stored_values end |