Class: StrictMoney::Configuration

Inherits:
Object
  • Object
show all
Includes:
Orms::Mongoid::Configuration
Defined in:
lib/strict_money/configuration.rb

Overview

Store configuration options for StrictMoney overall.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Orms::Mongoid::Configuration

#demongoize_amount

Constructor Details

#initializeConfiguration

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_currenciesObject

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

Returns:



14
15
16
# File 'lib/strict_money/configuration.rb', line 14

def supported_currency?(currency)
  (@supported_currencies == :all) || @supported_currencies.include?(currency)
end