Sha256: 45b1ff00b1e1de50a5ce64c96593c0adeb481c361b0b63db75c957add0016f08

Contents?: true

Size: 414 Bytes

Versions: 3

Compression:

Stored size: 414 Bytes

Contents

module StrictMoney
  # Store configuration options for StrictMoney overall.
  class Configuration
    attr_reader :supported_currencies

    def initialize
      @supported_currencies = :all
    end

    def supported_currencies=(sc)
      @supported_currencies = sc
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
strict_money-0.4.0 lib/strict_money/configuration.rb
strict_money-0.3.0 lib/strict_money/configuration.rb
strict_money-0.2.0 lib/strict_money/configuration.rb