Class: Danconia::Stores::InMemory

Inherits:
Object
  • Object
show all
Defined in:
lib/danconia/stores/in_memory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#ratesObject (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