Class: Danconia::Stores::InMemory
- Inherits:
-
Object
- Object
- Danconia::Stores::InMemory
- Defined in:
- lib/danconia/stores/in_memory.rb
Instance Attribute Summary collapse
-
#rates ⇒ Object
readonly
Returns the value of attribute rates.
Instance Method Summary collapse
-
#initialize(rates: {}) ⇒ InMemory
constructor
‘rates` should be of a map of pair->rate like => 1.25.
- #save_rates(rates) ⇒ Object
Constructor Details
#initialize(rates: {}) ⇒ InMemory
‘rates` should be of a map of pair->rate like => 1.25
7 8 9 |
# File 'lib/danconia/stores/in_memory.rb', line 7 def initialize rates: {} save_rates rates end |
Instance Attribute Details
#rates ⇒ Object (readonly)
Returns the value of attribute rates.
4 5 6 |
# File 'lib/danconia/stores/in_memory.rb', line 4 def rates @rates end |
Instance Method Details
#save_rates(rates) ⇒ Object
11 12 13 |
# File 'lib/danconia/stores/in_memory.rb', line 11 def save_rates rates @rates = rates end |