Method: Worldwide::Currencies#alpha_code_for
- Defined in:
- lib/worldwide/currencies.rb
#alpha_code_for(numeric_code) ⇒ Object
Convert ISO-4217 numeric-three code to ISO-4217 alpha-three code Returns nil if there is no such numeric code.
20 21 22 23 24 25 26 27 |
# File 'lib/worldwide/currencies.rb', line 20 def alpha_code_for(numeric_code) lookup_code = if numeric_code.is_a?(Integer) numeric_code else numeric_code&.to_s&.to_i end numeric_three_to_alpha_three_db[lookup_code]&.to_s end |