Class: ActiveCurrency::RateStore

Inherits:
DatabaseStore show all
Includes:
CacheableStore
Defined in:
lib/active_currency/rate_store.rb

Instance Method Summary collapse

Methods included from CacheableStore

#add_rate, #get_rate

Methods inherited from DatabaseStore

#add_rate, #get_rate

Instance Method Details

#marshal_dumpObject

Money::Bank::VariableExchange#marshal_load rebuilds the store with store_info.shift.new(*store_info), so a store's #marshal_dump must return [StoreClass, *constructor_args]. RateStore takes no arguments, so returning [self.class] lets a bank backed by this store be marshaled -- for example when the configured default bank is cached under a Marshal-based cache/serializer.



13
14
15
# File 'lib/active_currency/rate_store.rb', line 13

def marshal_dump
  [self.class]
end