Class: Money::Bank::Historical::Configuration
- Inherits:
-
Object
- Object
- Money::Bank::Historical::Configuration
- Defined in:
- lib/money/bank/historical.rb
Overview
Configuration class for Money::Bank::Historical
Instance Attribute Summary collapse
-
#base_currency ⇒ Object
Money::Currency
relative to which all exchange rates will be cached. -
#oer_account_type ⇒ Object
type of account on OpenExchangeRates, to know which API endpoints are useable.
-
#oer_app_id ⇒ Object
OpenExchangeRates app ID.
-
#redis_namespace ⇒ Object
Redis namespace in which the exchange rates will be cached.
-
#redis_url ⇒ Object
URL of the Redis server.
-
#timeout ⇒ Object
timeout to set in the OpenExchangeRates requests.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
44 45 46 47 48 49 50 51 |
# File 'lib/money/bank/historical.rb', line 44 def initialize @base_currency = Currency.new('EUR') @redis_url = 'redis://localhost:6379' @redis_namespace = 'currency' @oer_app_id = nil @timeout = 15 @oer_account_type = RatesProvider::OpenExchangeRates::AccountType::ENTERPRISE end |
Instance Attribute Details
#base_currency ⇒ Object
Money::Currency
relative to which all exchange rates will be cached
32 33 34 |
# File 'lib/money/bank/historical.rb', line 32 def base_currency @base_currency end |
#oer_account_type ⇒ Object
type of account on OpenExchangeRates, to know which API endpoints are useable
42 43 44 |
# File 'lib/money/bank/historical.rb', line 42 def oer_account_type @oer_account_type end |
#oer_app_id ⇒ Object
OpenExchangeRates app ID
38 39 40 |
# File 'lib/money/bank/historical.rb', line 38 def oer_app_id @oer_app_id end |
#redis_namespace ⇒ Object
Redis namespace in which the exchange rates will be cached
36 37 38 |
# File 'lib/money/bank/historical.rb', line 36 def redis_namespace @redis_namespace end |
#redis_url ⇒ Object
URL of the Redis server
34 35 36 |
# File 'lib/money/bank/historical.rb', line 34 def redis_url @redis_url end |
#timeout ⇒ Object
timeout to set in the OpenExchangeRates requests
40 41 42 |
# File 'lib/money/bank/historical.rb', line 40 def timeout @timeout end |