Module: Cistern::Data::ClassMethods
- Defined in:
- lib/cistern/data.rb
Instance Method Summary collapse
Instance Method Details
#clear! ⇒ Object
27 28 29 |
# File 'lib/cistern/data.rb', line 27 def clear! data.clear end |
#data ⇒ Object
18 19 20 |
# File 'lib/cistern/data.rb', line 18 def data @data ||= Cistern::Data.backend(*storage) { |d, k| d[k] = [] } end |
#reset! ⇒ Object
22 23 24 25 |
# File 'lib/cistern/data.rb', line 22 def reset! clear! @data = nil end |
#storage ⇒ Object
36 37 38 |
# File 'lib/cistern/data.rb', line 36 def storage @storage ||= :hash end |
#store_in(*args) ⇒ Object
31 32 33 34 |
# File 'lib/cistern/data.rb', line 31 def store_in(*args) @storage = *args @data = nil end |