Class: Known::Countries::Country
- Inherits:
-
Object
- Object
- Known::Countries::Country
- Defined in:
- lib/known/countries.rb
Overview
A country (based on ISO 3166-1).
Constant Summary collapse
- UNITED_ARAB_EMIRATES =
United Arab Emirates (“ae” in ISO 3166-1)
new(:ae)
- ARGENTINA =
Argentina (“ar” in ISO 3166-1)
new(:ar)
- AUSTRALIA =
Australia (“au” in ISO 3166-1)
new(:au)
- BRAZIL =
Brazil (“br” in ISO 3166-1)
new(:br)
- CANADA =
Canada (“ca” in ISO 3166-1)
new(:ca)
- SWITZERLAND =
Switzerland (“ch” in ISO 3166-1)
new(:ch)
- CHINA =
China (“cn” in ISO 3166-1)
new(:cn)
- GERMANY =
Germany (“de” in ISO 3166-1)
new(:de)
- EGYPT =
Egypt (“eg” in ISO 3166-1)
new(:eg)
- SPAIN =
Spain (“es” in ISO 3166-1)
new(:es)
- FINLAND =
Finland (“fi” in ISO 3166-1)
new(:fi)
- FRANCE =
France (“fr” in ISO 3166-1)
new(:fr)
- UNITED_KINGDOM =
United Kingdom (“gb” in ISO 3166-1)
new(:gb)
- GREECE =
Greece (“gr” in ISO 3166-1)
new(:gr)
- INDIA =
India (“in” in ISO 3166-1)
new(:in)
- ITALY =
Italy (“it” in ISO 3166-1)
new(:it)
- JAPAN =
Japan (“jp” in ISO 3166-1)
new(:jp)
- SOUTH_KOREA =
South Korea (“kr” in ISO 3166-1)
new(:kr)
- MEXICO =
Mexico (“mx” in ISO 3166-1)
new(:mx)
- NETHERLANDS =
Netherlands (“nl” in ISO 3166-1)
new(:nl)
- NORWAY =
Norway (“no” in ISO 3166-1)
new(:no)
- NEW_ZEALAND =
New Zealand (“nz” in ISO 3166-1)
new(:nz)
- POLAND =
Poland (“pl” in ISO 3166-1)
new(:pl)
- SAUDI_ARABIA =
Saudi Arabia (“sa” in ISO 3166-1)
new(:sa)
- SWEDEN =
Sweden (“se” in ISO 3166-1)
new(:se)
- SINGAPORE =
Singapore (“sg” in ISO 3166-1)
new(:sg)
- TURKEY =
Turkey (“tr” in ISO 3166-1)
new(:tr)
- UKRAINE =
Ukraine (“ua” in ISO 3166-1)
new(:ua)
- UNITED_STATES =
United States (“us” in ISO 3166-1)
new(:us)
- SOUTH_AFRICA =
South Africa (“za” in ISO 3166-1)
new(:za)
Instance Attribute Summary collapse
-
#code ⇒ Symbol
readonly
The country code (ISO 3166-1).
Instance Method Summary collapse
-
#initialize(code) ⇒ Country
constructor
Defines a new country.
Constructor Details
#initialize(code) ⇒ Country
Defines a new country.
21 22 23 24 |
# File 'lib/known/countries.rb', line 21 def initialize(code) @code = code.to_sym self.freeze end |
Instance Attribute Details
#code ⇒ Symbol (readonly)
The country code (ISO 3166-1).
13 14 15 |
# File 'lib/known/countries.rb', line 13 def code @code end |