Class: IsoCountryCodes::Code
- Inherits:
-
Object
- Object
- IsoCountryCodes::Code
- Includes:
- Singleton
- Defined in:
- lib/iso_country_codes/code.rb,
lib/iso_country_codes/iso_3166_1.rb
Direct Known Subclasses
ABW, AFG, AGO, AIA, ALA, ALB, AND, ANT, ARE, ARG, ARM, ASM, ATA, ATF, ATG, AUS, AUT, AZE, BDI, BEL, BEN, BFA, BGD, BGR, BHR, BHS, BIH, BLM, BLR, BLZ, BMU, BOL, BRA, BRB, BRN, BTN, BVT, BWA, CAF, CAN, CCK, CHE, CHL, CHN, CIV, CMR, COD, COG, COK, COL, COM, CPV, CRI, CUB, CXR, CYM, CYP, CZE, DEU, DJI, DMA, DNK, DOM, DZA, ECU, EGY, ERI, ESH, ESP, EST, ETH, FIN, FJI, FLK, FRA, FRO, FSM, GAB, GBR, GEO, GGY, GHA, GIB, GIN, GLP, GMB, GNB, GNQ, GRC, GRD, GRL, GTM, GUF, GUM, GUY, HKG, HMD, HND, HRV, HTI, HUN, IDN, IMN, IND, IOT, IRL, IRN, IRQ, ISL, ISR, ITA, JAM, JEY, JOR, JPN, KAZ, KEN, KGZ, KHM, KIR, KNA, KOR, KWT, LAO, LBN, LBR, LBY, LCA, LIE, LKA, LSO, LTU, LUX, LVA, MAC, MAF, MAR, MCO, MDA, MDG, MDV, MEX, MHL, MKD, MLI, MLT, MMR, MNE, MNG, MNP, MOZ, MRT, MSR, MTQ, MUS, MWI, MYS, MYT, NAM, NCL, NER, NFK, NGA, NIC, NIU, NLD, NOR, NPL, NRU, NZL, OMN, PAK, PAN, PCN, PER, PHL, PLW, PNG, POL, PRI, PRK, PRT, PRY, PSE, PYF, QAT, REU, ROU, RUS, RWA, SAU, SDN, SEN, SGP, SGS, SHN, SJM, SLB, SLE, SLV, SMR, SOM, SPM, SRB, STP, SUR, SVK, SVN, SWE, SWZ, SYC, SYR, TCA, TCD, TGO, THA, TJK, TKL, TKM, TLS, TON, TTO, TUN, TUR, TUV, TWN, TZA, UGA, UKR, UMI, URY, USA, UZB, VAT, VCT, VEN, VGB, VIR, VNM, VUT, WLF, WSM, YEM, ZAF, ZMB, ZWE
Defined Under Namespace
Classes: ABW, AFG, AGO, AIA, ALA, ALB, AND, ANT, ARE, ARG, ARM, ASM, ATA, ATF, ATG, AUS, AUT, AZE, BDI, BEL, BEN, BFA, BGD, BGR, BHR, BHS, BIH, BLM, BLR, BLZ, BMU, BOL, BRA, BRB, BRN, BTN, BVT, BWA, CAF, CAN, CCK, CHE, CHL, CHN, CIV, CMR, COD, COG, COK, COL, COM, CPV, CRI, CUB, CXR, CYM, CYP, CZE, DEU, DJI, DMA, DNK, DOM, DZA, ECU, EGY, ERI, ESH, ESP, EST, ETH, FIN, FJI, FLK, FRA, FRO, FSM, GAB, GBR, GEO, GGY, GHA, GIB, GIN, GLP, GMB, GNB, GNQ, GRC, GRD, GRL, GTM, GUF, GUM, GUY, HKG, HMD, HND, HRV, HTI, HUN, IDN, IMN, IND, IOT, IRL, IRN, IRQ, ISL, ISR, ITA, JAM, JEY, JOR, JPN, KAZ, KEN, KGZ, KHM, KIR, KNA, KOR, KWT, LAO, LBN, LBR, LBY, LCA, LIE, LKA, LSO, LTU, LUX, LVA, MAC, MAF, MAR, MCO, MDA, MDG, MDV, MEX, MHL, MKD, MLI, MLT, MMR, MNE, MNG, MNP, MOZ, MRT, MSR, MTQ, MUS, MWI, MYS, MYT, NAM, NCL, NER, NFK, NGA, NIC, NIU, NLD, NOR, NPL, NRU, NZL, OMN, PAK, PAN, PCN, PER, PHL, PLW, PNG, POL, PRI, PRK, PRT, PRY, PSE, PYF, QAT, REU, ROU, RUS, RWA, SAU, SDN, SEN, SGP, SGS, SHN, SJM, SLB, SLE, SLV, SMR, SOM, SPM, SRB, STP, SUR, SVK, SVN, SWE, SWZ, SYC, SYR, TCA, TCD, TGO, THA, TJK, TKL, TKM, TLS, TON, TTO, TUN, TUR, TUV, TWN, TZA, UGA, UKR, UMI, URY, USA, UZB, VAT, VCT, VEN, VGB, VIR, VNM, VUT, WLF, WSM, YEM, ZAF, ZMB, ZWE
Constant Summary collapse
- @@codes =
[]
Class Attribute Summary collapse
-
.alpha2 ⇒ Object
Returns the value of attribute alpha2.
-
.alpha3 ⇒ Object
Returns the value of attribute alpha3.
-
.name ⇒ Object
Returns the value of attribute name.
-
.numeric ⇒ Object
Returns the value of attribute numeric.
Class Method Summary collapse
- .all ⇒ Object
-
.inherited(code) ⇒ Object
:nodoc:.
Instance Method Summary collapse
Class Attribute Details
.alpha2 ⇒ Object
Returns the value of attribute alpha2.
24 25 26 |
# File 'lib/iso_country_codes/code.rb', line 24 def alpha2 @alpha2 end |
.alpha3 ⇒ Object
Returns the value of attribute alpha3.
24 25 26 |
# File 'lib/iso_country_codes/code.rb', line 24 def alpha3 @alpha3 end |
.name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/iso_country_codes/code.rb', line 24 def name @name end |
.numeric ⇒ Object
Returns the value of attribute numeric.
24 25 26 |
# File 'lib/iso_country_codes/code.rb', line 24 def numeric @numeric end |
Class Method Details
.all ⇒ Object
32 33 34 |
# File 'lib/iso_country_codes/code.rb', line 32 def all @@codes.uniq end |
.inherited(code) ⇒ Object
:nodoc:
27 28 29 30 |
# File 'lib/iso_country_codes/code.rb', line 27 def inherited(code) #:nodoc: super @@codes << code.instance if self == IsoCountryCodes::Code end |
Instance Method Details
#alpha2 ⇒ Object
15 16 17 |
# File 'lib/iso_country_codes/code.rb', line 15 def alpha2 self.class.alpha2 end |
#alpha3 ⇒ Object
19 20 21 |
# File 'lib/iso_country_codes/code.rb', line 19 def alpha3 self.class.alpha3 end |
#name ⇒ Object
7 8 9 |
# File 'lib/iso_country_codes/code.rb', line 7 def name self.class.name end |
#numeric ⇒ Object
11 12 13 |
# File 'lib/iso_country_codes/code.rb', line 11 def numeric self.class.numeric end |