Module: ExchangeRatesGenerator::Currencies
- Defined in:
- lib/exchange-rates-generator/currencies.rb
Overview
Generated using “rake currency:generate_currency_codes” from within the exchange-rates-generator gem. Scraped from www.iso.org/iso/support/currency_codes_list-1.htm These are utf-8 so ensure that you correctly setup the necessary encodings in your app
Class Method Summary collapse
Class Method Details
.get(code) ⇒ Object
7 8 9 10 11 |
# File 'lib/exchange-rates-generator/currencies.rb', line 7 def self.get(code) return nil if RAW[noramalise_code(code)] == nil name, entity = RAW[noramalise_code(code)] Currency.new(noramalise_code(code).to_sym, name, entity) end |
.get_name(code) ⇒ Object
13 14 15 16 |
# File 'lib/exchange-rates-generator/currencies.rb', line 13 def self.get_name(code) return nil if RAW[noramalise_code(code)] == nil RAW[noramalise_code(code)][0] end |