Sha256: 43fdfa70d2daf0e47cab8a11b26553c714ed5c46c6645ddda77448ddcadebad9
Contents?: true
Size: 930 Bytes
Versions: 1
Compression:
Stored size: 930 Bytes
Contents
require "strict_money/amount" require "strict_money/configuration" require "strict_money/historical_amount" require "strict_money/version" require "strict_money/railtie" if defined?(Rails::Railtie) require "forwardable" # Manipulate money and currency with strictness around currencies and time periods. module StrictMoney # Exception raised when someone uses a currency that is not supported within # the application. UnsupportedCurrencyError = Class.new(StandardError) # Exception raised when someone uses an invalid currency in a method call. WrongCurrencyError = Class.new(StandardError) class << self extend Forwardable def_delegators :configuration, :supported_currency?, :supported_currencies attr_reader :configuration def configure yield(configuration) end def reset_configuration @configuration = Configuration.new end end end StrictMoney.reset_configuration
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
strict_money-0.4.0 | lib/strict_money.rb |