Module: ISO3166::CountryCurrencyMethods

Defined in:
lib/countries/country/currency_methods.rb

Overview

Optional extension which allows you to get back a Money::Currency object with all the currency info. This requires enabling the integration with the Money gem (See ISO3166::Configuration#enable_currency_extension!)

Instance Method Summary collapse

Instance Method Details

#currencyMoney::Currency

Returns The currency data for this Country’s currency_code.

Returns:

  • (Money::Currency)

    The currency data for this Country’s currency_code



10
11
12
# File 'lib/countries/country/currency_methods.rb', line 10

def currency
  Money::Currency.find(data['currency_code'])
end