This class models out a region/country from the ISO 3166 standard for region codes. In ISO3166, it’s called “Country” but Ruby/Locale the word “Region” instead.
The 2 or 3 digit ISO 3166 region code.
The name of the region.
# File lib/locale/info/region.rb, line 24 def initialize(code, name) @code = code @name = name end
# File lib/locale/info/region.rb, line 29 def iso_region? @@regions[code] != nil end
# File lib/locale/info/region.rb, line 33 def to_s "#{code}" end