Module: StrictMoney

Extended by:
Forwardable
Defined in:
lib/strict_money.rb,
lib/strict_money/amount.rb,
lib/strict_money/railtie.rb,
lib/strict_money/version.rb,
lib/strict_money/configuration.rb,
lib/strict_money/historical_amount.rb,
lib/strict_money/orms/mongoid/amount.rb,
lib/strict_money/orms/mongoid/configuration.rb

Overview

Manipulate money and currency with strictness around currencies and time periods.

Defined Under Namespace

Modules: Orms Classes: Amount, Configuration, HistoricalAmount, Railtie

Constant Summary collapse

UnsupportedCurrencyError =

Exception raised when someone uses a currency that is not supported within the application.

Class.new(StandardError)
WrongCurrencyError =

Exception raised when someone uses an invalid currency in a method call.

Class.new(StandardError)
VERSION =
"0.4.0".freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject (readonly)

Returns the value of attribute configuration.



21
22
23
# File 'lib/strict_money.rb', line 21

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



23
24
25
# File 'lib/strict_money.rb', line 23

def configure
  yield(configuration)
end

.reset_configurationObject



27
28
29
# File 'lib/strict_money.rb', line 27

def reset_configuration
  @configuration = Configuration.new
end