Class: ActiveCurrency::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/active_currency/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
# File 'lib/active_currency/configuration.rb', line 5

def initialize
  @remote_bank = :eu_central_bank
  @open_exchange_rates_app_id = nil
  @multiplier = {}
  @cache_enabled = true
end

Instance Attribute Details

#cache_enabledObject

Returns the value of attribute cache_enabled.



12
13
14
# File 'lib/active_currency/configuration.rb', line 12

def cache_enabled
  @cache_enabled
end

#multiplierObject

Returns the value of attribute multiplier.



12
13
14
# File 'lib/active_currency/configuration.rb', line 12

def multiplier
  @multiplier
end

#open_exchange_rates_app_idObject

Returns the value of attribute open_exchange_rates_app_id.



12
13
14
# File 'lib/active_currency/configuration.rb', line 12

def open_exchange_rates_app_id
  @open_exchange_rates_app_id
end

#remote_bankObject

Returns the value of attribute remote_bank.



12
13
14
# File 'lib/active_currency/configuration.rb', line 12

def remote_bank
  @remote_bank
end

Instance Method Details

#cache_enabled?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/active_currency/configuration.rb', line 17

def cache_enabled?
  !!@cache_enabled
end