Module: Money::Currency::Loader

Included in:
Money::Currency
Defined in:
lib/money/currency/loader.rb

Constant Summary collapse

DATA_PATH =
File.expand_path("../../../../config", __FILE__)

Instance Method Summary collapse

Instance Method Details

#load_currenciesHash

Loads and returns the currencies stored in JSON files in the config directory.

Returns:

  • (Hash)


9
10
11
12
13
# File 'lib/money/currency/loader.rb', line 9

def load_currencies
  currencies = parse_currency_file("currency_iso.json")
  currencies.merge! parse_currency_file("currency_non_iso.json")
  currencies.merge! parse_currency_file("currency_backwards_compatible.json")
end