Class: Cranium::Extract::Storage

Inherits:
Object
  • Object
show all
Defined in:
lib/cranium/extract/storage.rb

Constant Summary collapse

STORAGE_FILE_NAME =
"extracts"

Instance Method Summary collapse

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