Class: StrictMoney::Configuration
- Inherits:
-
Object
- Object
- StrictMoney::Configuration
- Includes:
- Orms::Mongoid::Configuration
- Defined in:
- lib/strict_money/configuration.rb
Overview
Store configuration options for StrictMoney overall.
Instance Attribute Summary collapse
-
#supported_currencies ⇒ Object
Returns the value of attribute supported_currencies.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #supported_currency?(currency) ⇒ Boolean
Methods included from Orms::Mongoid::Configuration
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 |
# File 'lib/strict_money/configuration.rb', line 6 def initialize @supported_currencies = :all end |
Instance Attribute Details
#supported_currencies ⇒ Object
Returns the value of attribute supported_currencies.
4 5 6 |
# File 'lib/strict_money/configuration.rb', line 4 def supported_currencies @supported_currencies end |
Instance Method Details
#supported_currency?(currency) ⇒ Boolean
14 15 16 |
# File 'lib/strict_money/configuration.rb', line 14 def supported_currency?(currency) (@supported_currencies == :all) || @supported_currencies.include?(currency) end |