class ExchangeRateJt::DataStoreFactory
DataStoreFactory
builds and returns an instance of the appropriate data store handler for the defined data store type
Constants
- MAPS
Public Class Methods
build(data_store_type, data_store)
click to toggle source
# File lib/exchange_rate_jt/data_store_factory.rb, line 11 def self.build(data_store_type, data_store) MAPS[data_store_type].new(data_store) rescue raise InvalidDataStoreTypeError, 'Invalid or no data store type specified' end