module Money::Currency::Loader

def load_currencies

Returns:
  • (Hash) -
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

def parse_currency_file(filename)

def parse_currency_file(filename)
  json = File.read("#{DATA_PATH}/#{filename}")
  json.force_encoding(::Encoding::UTF_8) if defined?(::Encoding)
  JSON.parse(json, symbolize_names: true)
end