Module: ItuCodes::Helpers

Defined in:
lib/itu_codes/helpers.rb

Constant Summary collapse

ISO2ITU =
YAML.load_file(  File.expand_path(File.dirname(__FILE__)) + '/../data/iso_code_to_itu_country_names.yml')

Class Method Summary collapse

Class Method Details

.country_code_lookup(country_name) ⇒ Object

country name is the one used by ITU, not ISO



8
9
10
# File 'lib/itu_codes/helpers.rb', line 8

def self.country_code_lookup(country_name)
  ISO2ITU.key(country_name)
end

.country_name_lookup(iso_code) ⇒ Object



12
13
14
# File 'lib/itu_codes/helpers.rb', line 12

def self.country_name_lookup(iso_code)
  ISO2ITU[iso_code]
end