iso_country_codes 0.4.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 281e29b40507d48f86c81895fe4a47719ec67705
4
- data.tar.gz: c281aac39e8896673cefca4957574c60e6fb7529
3
+ metadata.gz: b068a38c7d7b521e7405175c90656f0639fc1967
4
+ data.tar.gz: d221055e2da8108c8c1335ca3441f375c09939e5
5
5
  SHA512:
6
- metadata.gz: 759cbf3682d51763e76e9fd9098fddb527383ae5fdb941d20e1540a0847f2e9731d3148764497cc891408e998030b2edbd151a06d21970e909649d28f71dbf60
7
- data.tar.gz: a9d5e10402dd0e1f55558c8f12acc0ceaaa2d56b0d948a32839c5185613b5445b5e681393270ef7dbeb9a930ba130e3c43222de0bd73c9ee92542494c0ee89ae
6
+ metadata.gz: fb391ef4e86acec128fc4ca4ab5fffce502136d52636fe7913e280d19d4d9f9cbd40141a5e40d7d78708cebffc3da02315cd93b478e32c7d0386cc8d111f3499
7
+ data.tar.gz: 141b333bd255b15fb3d14dd7761cef87a5a86dc08b715017d4bfb16763fd90cbf88f62d349f5edfe67adb7a7bbb599f7c4c0e053bc31e2d80cec0b5ec25934c1
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.5.0 / 2014-10-13
2
+
3
+ * Added continent codes
4
+
1
5
  === 0.4.4 / 2014-07-23
2
6
 
3
7
  * Corrected Korean currency codes (fixes #13)
data/Manifest.txt CHANGED
@@ -5,6 +5,8 @@ Rakefile
5
5
  iso_country_codes.gemspec
6
6
  lib/iso_country_codes.rb
7
7
  lib/iso_country_codes/code.rb
8
+ lib/iso_country_codes/calling.rb
9
+ lib/iso_country_codes/continent.rb
8
10
  lib/iso_country_codes/iso_3166_1.rb
9
11
  lib/iso_country_codes/iso_4217.rb
10
12
  lib/iso_country_codes/iso_country_codes.rb
data/README.rdoc CHANGED
@@ -14,11 +14,12 @@ Provides ISO codes, names and currencies for countries.
14
14
 
15
15
  # Finding an ISO code returns the country name and other code formats
16
16
  code = IsoCountryCodes.find('au')
17
- code.name # => "Australia"
18
- code.numeric # => "036"
19
- code.alpha2 # => "AU"
20
- code.alpha3 # => "AUS"
21
- code.calling # => "+61"
17
+ code.name # => "Australia"
18
+ code.numeric # => "036"
19
+ code.alpha2 # => "AU"
20
+ code.alpha3 # => "AUS"
21
+ code.calling # => "+61"
22
+ code.continent # => "OC"
22
23
 
23
24
  # Codes can be found via numeric, alpha-2 or alpha-3 format
24
25
  IsoCountryCodes.find(36)
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'rake'
2
2
  require './lib/iso_country_codes.rb'
3
- require 'bundler/gem_tasks'
4
3
  require 'rake/testtask'
5
4
 
6
5
  Rake::TestTask.new(:test) do |t|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.4
1
+ 0.5.0
@@ -41,7 +41,7 @@ class IsoCountryCodes
41
41
  end
42
42
 
43
43
  class << self
44
- attr_accessor :name, :numeric, :alpha2, :alpha3, :calling, :main_currency
44
+ attr_accessor :name, :numeric, :alpha2, :alpha3, :calling, :continent, :main_currency
45
45
  attr_writer :currencies
46
46
  alias_method :currency, :main_currency
47
47
  alias_method :calling_code, :calling
@@ -0,0 +1,741 @@
1
+ # Sourced from http://dev.maxmind.com/geoip/legacy/codes/country_continent/
2
+
3
+ class IsoCountryCodes
4
+ class Code
5
+ class AND < Code #:nodoc:
6
+ self.continent = 'EU'
7
+ end
8
+ class ARE < Code #:nodoc:
9
+ self.continent = 'AS'
10
+ end
11
+ class AFG < Code #:nodoc:
12
+ self.continent = 'AS'
13
+ end
14
+ class ATG < Code #:nodoc:
15
+ self.continent = 'NA'
16
+ end
17
+ class AIA < Code #:nodoc:
18
+ self.continent = 'NA'
19
+ end
20
+ class ALB < Code #:nodoc:
21
+ self.continent = 'EU'
22
+ end
23
+ class ARM < Code #:nodoc:
24
+ self.continent = 'AS'
25
+ end
26
+ class AGO < Code #:nodoc:
27
+ self.continent = 'AF'
28
+ end
29
+ class ATA < Code #:nodoc:
30
+ self.continent = 'AN'
31
+ end
32
+ class ARG < Code #:nodoc:
33
+ self.continent = 'SA'
34
+ end
35
+ class ASM < Code #:nodoc:
36
+ self.continent = 'OC'
37
+ end
38
+ class AUT < Code #:nodoc:
39
+ self.continent = 'EU'
40
+ end
41
+ class AUS < Code #:nodoc:
42
+ self.continent = 'OC'
43
+ end
44
+ class ABW < Code #:nodoc:
45
+ self.continent = 'NA'
46
+ end
47
+ class ALA < Code #:nodoc:
48
+ self.continent = 'EU'
49
+ end
50
+ class AZE < Code #:nodoc:
51
+ self.continent = 'AS'
52
+ end
53
+ class BIH < Code #:nodoc:
54
+ self.continent = 'EU'
55
+ end
56
+ class BRB < Code #:nodoc:
57
+ self.continent = 'NA'
58
+ end
59
+ class BGD < Code #:nodoc:
60
+ self.continent = 'AS'
61
+ end
62
+ class BEL < Code #:nodoc:
63
+ self.continent = 'EU'
64
+ end
65
+ class BFA < Code #:nodoc:
66
+ self.continent = 'AF'
67
+ end
68
+ class BGR < Code #:nodoc:
69
+ self.continent = 'EU'
70
+ end
71
+ class BHR < Code #:nodoc:
72
+ self.continent = 'AS'
73
+ end
74
+ class BDI < Code #:nodoc:
75
+ self.continent = 'AF'
76
+ end
77
+ class BEN < Code #:nodoc:
78
+ self.continent = 'AF'
79
+ end
80
+ class BLM < Code #:nodoc:
81
+ self.continent = 'NA'
82
+ end
83
+ class BMU < Code #:nodoc:
84
+ self.continent = 'NA'
85
+ end
86
+ class BRN < Code #:nodoc:
87
+ self.continent = 'AS'
88
+ end
89
+ class BOL < Code #:nodoc:
90
+ self.continent = 'SA'
91
+ end
92
+ class BRA < Code #:nodoc:
93
+ self.continent = 'SA'
94
+ end
95
+ class BHS < Code #:nodoc:
96
+ self.continent = 'NA'
97
+ end
98
+ class BTN < Code #:nodoc:
99
+ self.continent = 'AS'
100
+ end
101
+ class BVT < Code #:nodoc:
102
+ self.continent = 'AN'
103
+ end
104
+ class BWA < Code #:nodoc:
105
+ self.continent = 'AF'
106
+ end
107
+ class BLR < Code #:nodoc:
108
+ self.continent = 'EU'
109
+ end
110
+ class BLZ < Code #:nodoc:
111
+ self.continent = 'NA'
112
+ end
113
+ class CAN < Code #:nodoc:
114
+ self.continent = 'NA'
115
+ end
116
+ class CCK < Code #:nodoc:
117
+ self.continent = 'AS'
118
+ end
119
+ class COD < Code #:nodoc:
120
+ self.continent = 'AF'
121
+ end
122
+ class CAF < Code #:nodoc:
123
+ self.continent = 'AF'
124
+ end
125
+ class COG < Code #:nodoc:
126
+ self.continent = 'AF'
127
+ end
128
+ class CHE < Code #:nodoc:
129
+ self.continent = 'EU'
130
+ end
131
+ class CIV < Code #:nodoc:
132
+ self.continent = 'AF'
133
+ end
134
+ class COK < Code #:nodoc:
135
+ self.continent = 'OC'
136
+ end
137
+ class CHL < Code #:nodoc:
138
+ self.continent = 'SA'
139
+ end
140
+ class CMR < Code #:nodoc:
141
+ self.continent = 'AF'
142
+ end
143
+ class CHN < Code #:nodoc:
144
+ self.continent = 'AS'
145
+ end
146
+ class COL < Code #:nodoc:
147
+ self.continent = 'SA'
148
+ end
149
+ class CRI < Code #:nodoc:
150
+ self.continent = 'NA'
151
+ end
152
+ class CUB < Code #:nodoc:
153
+ self.continent = 'NA'
154
+ end
155
+ class CPV < Code #:nodoc:
156
+ self.continent = 'AF'
157
+ end
158
+ class CXR < Code #:nodoc:
159
+ self.continent = 'AS'
160
+ end
161
+ class CYP < Code #:nodoc:
162
+ self.continent = 'AS'
163
+ end
164
+ class CZE < Code #:nodoc:
165
+ self.continent = 'EU'
166
+ end
167
+ class DEU < Code #:nodoc:
168
+ self.continent = 'EU'
169
+ end
170
+ class DJI < Code #:nodoc:
171
+ self.continent = 'AF'
172
+ end
173
+ class DNK < Code #:nodoc:
174
+ self.continent = 'EU'
175
+ end
176
+ class DMA < Code #:nodoc:
177
+ self.continent = 'NA'
178
+ end
179
+ class DOM < Code #:nodoc:
180
+ self.continent = 'NA'
181
+ end
182
+ class DZA < Code #:nodoc:
183
+ self.continent = 'AF'
184
+ end
185
+ class ECU < Code #:nodoc:
186
+ self.continent = 'SA'
187
+ end
188
+ class EST < Code #:nodoc:
189
+ self.continent = 'EU'
190
+ end
191
+ class EGY < Code #:nodoc:
192
+ self.continent = 'AF'
193
+ end
194
+ class ESH < Code #:nodoc:
195
+ self.continent = 'AF'
196
+ end
197
+ class ERI < Code #:nodoc:
198
+ self.continent = 'AF'
199
+ end
200
+ class ESP < Code #:nodoc:
201
+ self.continent = 'EU'
202
+ end
203
+ class ETH < Code #:nodoc:
204
+ self.continent = 'AF'
205
+ end
206
+ class FIN < Code #:nodoc:
207
+ self.continent = 'EU'
208
+ end
209
+ class FJI < Code #:nodoc:
210
+ self.continent = 'OC'
211
+ end
212
+ class FLK < Code #:nodoc:
213
+ self.continent = 'SA'
214
+ end
215
+ class FSM < Code #:nodoc:
216
+ self.continent = 'OC'
217
+ end
218
+ class FRO < Code #:nodoc:
219
+ self.continent = 'EU'
220
+ end
221
+ class FRA < Code #:nodoc:
222
+ self.continent = 'EU'
223
+ end
224
+ class GAB < Code #:nodoc:
225
+ self.continent = 'AF'
226
+ end
227
+ class GBR < Code #:nodoc:
228
+ self.continent = 'EU'
229
+ end
230
+ class GRD < Code #:nodoc:
231
+ self.continent = 'NA'
232
+ end
233
+ class GEO < Code #:nodoc:
234
+ self.continent = 'AS'
235
+ end
236
+ class GUF < Code #:nodoc:
237
+ self.continent = 'SA'
238
+ end
239
+ class GGY < Code #:nodoc:
240
+ self.continent = 'EU'
241
+ end
242
+ class GHA < Code #:nodoc:
243
+ self.continent = 'AF'
244
+ end
245
+ class GIB < Code #:nodoc:
246
+ self.continent = 'EU'
247
+ end
248
+ class GRL < Code #:nodoc:
249
+ self.continent = 'NA'
250
+ end
251
+ class GMB < Code #:nodoc:
252
+ self.continent = 'AF'
253
+ end
254
+ class GIN < Code #:nodoc:
255
+ self.continent = 'AF'
256
+ end
257
+ class GLP < Code #:nodoc:
258
+ self.continent = 'NA'
259
+ end
260
+ class GNQ < Code #:nodoc:
261
+ self.continent = 'AF'
262
+ end
263
+ class GRC < Code #:nodoc:
264
+ self.continent = 'EU'
265
+ end
266
+ class SGS < Code #:nodoc:
267
+ self.continent = 'AN'
268
+ end
269
+ class GTM < Code #:nodoc:
270
+ self.continent = 'NA'
271
+ end
272
+ class GUM < Code #:nodoc:
273
+ self.continent = 'OC'
274
+ end
275
+ class GNB < Code #:nodoc:
276
+ self.continent = 'AF'
277
+ end
278
+ class GUY < Code #:nodoc:
279
+ self.continent = 'SA'
280
+ end
281
+ class HKG < Code #:nodoc:
282
+ self.continent = 'AS'
283
+ end
284
+ class HMD < Code #:nodoc:
285
+ self.continent = 'AN'
286
+ end
287
+ class HND < Code #:nodoc:
288
+ self.continent = 'NA'
289
+ end
290
+ class HRV < Code #:nodoc:
291
+ self.continent = 'EU'
292
+ end
293
+ class HTI < Code #:nodoc:
294
+ self.continent = 'NA'
295
+ end
296
+ class HUN < Code #:nodoc:
297
+ self.continent = 'EU'
298
+ end
299
+ class IDN < Code #:nodoc:
300
+ self.continent = 'AS'
301
+ end
302
+ class IRL < Code #:nodoc:
303
+ self.continent = 'EU'
304
+ end
305
+ class ISR < Code #:nodoc:
306
+ self.continent = 'AS'
307
+ end
308
+ class IMN < Code #:nodoc:
309
+ self.continent = 'EU'
310
+ end
311
+ class IND < Code #:nodoc:
312
+ self.continent = 'AS'
313
+ end
314
+ class IOT < Code #:nodoc:
315
+ self.continent = 'AS'
316
+ end
317
+ class IRQ < Code #:nodoc:
318
+ self.continent = 'AS'
319
+ end
320
+ class IRN < Code #:nodoc:
321
+ self.continent = 'AS'
322
+ end
323
+ class ISL < Code #:nodoc:
324
+ self.continent = 'EU'
325
+ end
326
+ class ITA < Code #:nodoc:
327
+ self.continent = 'EU'
328
+ end
329
+ class JEY < Code #:nodoc:
330
+ self.continent = 'EU'
331
+ end
332
+ class JAM < Code #:nodoc:
333
+ self.continent = 'NA'
334
+ end
335
+ class JOR < Code #:nodoc:
336
+ self.continent = 'AS'
337
+ end
338
+ class JPN < Code #:nodoc:
339
+ self.continent = 'AS'
340
+ end
341
+ class KEN < Code #:nodoc:
342
+ self.continent = 'AF'
343
+ end
344
+ class KGZ < Code #:nodoc:
345
+ self.continent = 'AS'
346
+ end
347
+ class KHM < Code #:nodoc:
348
+ self.continent = 'AS'
349
+ end
350
+ class KIR < Code #:nodoc:
351
+ self.continent = 'OC'
352
+ end
353
+ class COM < Code #:nodoc:
354
+ self.continent = 'AF'
355
+ end
356
+ class KNA < Code #:nodoc:
357
+ self.continent = 'NA'
358
+ end
359
+ class PRK < Code #:nodoc:
360
+ self.continent = 'AS'
361
+ end
362
+ class KOR < Code #:nodoc:
363
+ self.continent = 'AS'
364
+ end
365
+ class KWT < Code #:nodoc:
366
+ self.continent = 'AS'
367
+ end
368
+ class CYM < Code #:nodoc:
369
+ self.continent = 'NA'
370
+ end
371
+ class KAZ < Code #:nodoc:
372
+ self.continent = 'AS'
373
+ end
374
+ class LAO < Code #:nodoc:
375
+ self.continent = 'AS'
376
+ end
377
+ class LBN < Code #:nodoc:
378
+ self.continent = 'AS'
379
+ end
380
+ class LCA < Code #:nodoc:
381
+ self.continent = 'NA'
382
+ end
383
+ class LIE < Code #:nodoc:
384
+ self.continent = 'EU'
385
+ end
386
+ class LKA < Code #:nodoc:
387
+ self.continent = 'AS'
388
+ end
389
+ class LBR < Code #:nodoc:
390
+ self.continent = 'AF'
391
+ end
392
+ class LSO < Code #:nodoc:
393
+ self.continent = 'AF'
394
+ end
395
+ class LTU < Code #:nodoc:
396
+ self.continent = 'EU'
397
+ end
398
+ class LUX < Code #:nodoc:
399
+ self.continent = 'EU'
400
+ end
401
+ class LVA < Code #:nodoc:
402
+ self.continent = 'EU'
403
+ end
404
+ class LBY < Code #:nodoc:
405
+ self.continent = 'AF'
406
+ end
407
+ class MAR < Code #:nodoc:
408
+ self.continent = 'AF'
409
+ end
410
+ class MCO < Code #:nodoc:
411
+ self.continent = 'EU'
412
+ end
413
+ class MDA < Code #:nodoc:
414
+ self.continent = 'EU'
415
+ end
416
+ class MNE < Code #:nodoc:
417
+ self.continent = 'EU'
418
+ end
419
+ class MAF < Code #:nodoc:
420
+ self.continent = 'NA'
421
+ end
422
+ class MDG < Code #:nodoc:
423
+ self.continent = 'AF'
424
+ end
425
+ class MHL < Code #:nodoc:
426
+ self.continent = 'OC'
427
+ end
428
+ class MKD < Code #:nodoc:
429
+ self.continent = 'EU'
430
+ end
431
+ class MLI < Code #:nodoc:
432
+ self.continent = 'AF'
433
+ end
434
+ class MMR < Code #:nodoc:
435
+ self.continent = 'AS'
436
+ end
437
+ class MNG < Code #:nodoc:
438
+ self.continent = 'AS'
439
+ end
440
+ class MAC < Code #:nodoc:
441
+ self.continent = 'AS'
442
+ end
443
+ class MNP < Code #:nodoc:
444
+ self.continent = 'OC'
445
+ end
446
+ class MTQ < Code #:nodoc:
447
+ self.continent = 'NA'
448
+ end
449
+ class MRT < Code #:nodoc:
450
+ self.continent = 'AF'
451
+ end
452
+ class MSR < Code #:nodoc:
453
+ self.continent = 'NA'
454
+ end
455
+ class MLT < Code #:nodoc:
456
+ self.continent = 'EU'
457
+ end
458
+ class MUS < Code #:nodoc:
459
+ self.continent = 'AF'
460
+ end
461
+ class MDV < Code #:nodoc:
462
+ self.continent = 'AS'
463
+ end
464
+ class MWI < Code #:nodoc:
465
+ self.continent = 'AF'
466
+ end
467
+ class MEX < Code #:nodoc:
468
+ self.continent = 'NA'
469
+ end
470
+ class MYS < Code #:nodoc:
471
+ self.continent = 'AS'
472
+ end
473
+ class MOZ < Code #:nodoc:
474
+ self.continent = 'AF'
475
+ end
476
+ class NAM < Code #:nodoc:
477
+ self.continent = 'AF'
478
+ end
479
+ class NCL < Code #:nodoc:
480
+ self.continent = 'OC'
481
+ end
482
+ class NER < Code #:nodoc:
483
+ self.continent = 'AF'
484
+ end
485
+ class NFK < Code #:nodoc:
486
+ self.continent = 'OC'
487
+ end
488
+ class NGA < Code #:nodoc:
489
+ self.continent = 'AF'
490
+ end
491
+ class NIC < Code #:nodoc:
492
+ self.continent = 'NA'
493
+ end
494
+ class NLD < Code #:nodoc:
495
+ self.continent = 'EU'
496
+ end
497
+ class NOR < Code #:nodoc:
498
+ self.continent = 'EU'
499
+ end
500
+ class NPL < Code #:nodoc:
501
+ self.continent = 'AS'
502
+ end
503
+ class NRU < Code #:nodoc:
504
+ self.continent = 'OC'
505
+ end
506
+ class NIU < Code #:nodoc:
507
+ self.continent = 'OC'
508
+ end
509
+ class NZL < Code #:nodoc:
510
+ self.continent = 'OC'
511
+ end
512
+ class OMN < Code #:nodoc:
513
+ self.continent = 'AS'
514
+ end
515
+ class PAN < Code #:nodoc:
516
+ self.continent = 'NA'
517
+ end
518
+ class PER < Code #:nodoc:
519
+ self.continent = 'SA'
520
+ end
521
+ class PYF < Code #:nodoc:
522
+ self.continent = 'OC'
523
+ end
524
+ class PNG < Code #:nodoc:
525
+ self.continent = 'OC'
526
+ end
527
+ class PHL < Code #:nodoc:
528
+ self.continent = 'AS'
529
+ end
530
+ class PAK < Code #:nodoc:
531
+ self.continent = 'AS'
532
+ end
533
+ class POL < Code #:nodoc:
534
+ self.continent = 'EU'
535
+ end
536
+ class SPM < Code #:nodoc:
537
+ self.continent = 'NA'
538
+ end
539
+ class PCN < Code #:nodoc:
540
+ self.continent = 'OC'
541
+ end
542
+ class PRI < Code #:nodoc:
543
+ self.continent = 'NA'
544
+ end
545
+ class PSE < Code #:nodoc:
546
+ self.continent = 'AS'
547
+ end
548
+ class PRT < Code #:nodoc:
549
+ self.continent = 'EU'
550
+ end
551
+ class PLW < Code #:nodoc:
552
+ self.continent = 'OC'
553
+ end
554
+ class PRY < Code #:nodoc:
555
+ self.continent = 'SA'
556
+ end
557
+ class QAT < Code #:nodoc:
558
+ self.continent = 'AS'
559
+ end
560
+ class REU < Code #:nodoc:
561
+ self.continent = 'AF'
562
+ end
563
+ class ROU < Code #:nodoc:
564
+ self.continent = 'EU'
565
+ end
566
+ class SRB < Code #:nodoc:
567
+ self.continent = 'EU'
568
+ end
569
+ class RUS < Code #:nodoc:
570
+ self.continent = 'EU'
571
+ end
572
+ class RWA < Code #:nodoc:
573
+ self.continent = 'AF'
574
+ end
575
+ class SAU < Code #:nodoc:
576
+ self.continent = 'AS'
577
+ end
578
+ class SLB < Code #:nodoc:
579
+ self.continent = 'OC'
580
+ end
581
+ class SYC < Code #:nodoc:
582
+ self.continent = 'AF'
583
+ end
584
+ class SDN < Code #:nodoc:
585
+ self.continent = 'AF'
586
+ end
587
+ class SWE < Code #:nodoc:
588
+ self.continent = 'EU'
589
+ end
590
+ class SGP < Code #:nodoc:
591
+ self.continent = 'AS'
592
+ end
593
+ class SHN < Code #:nodoc:
594
+ self.continent = 'AF'
595
+ end
596
+ class SVN < Code #:nodoc:
597
+ self.continent = 'EU'
598
+ end
599
+ class SJM < Code #:nodoc:
600
+ self.continent = 'EU'
601
+ end
602
+ class SVK < Code #:nodoc:
603
+ self.continent = 'EU'
604
+ end
605
+ class SLE < Code #:nodoc:
606
+ self.continent = 'AF'
607
+ end
608
+ class SMR < Code #:nodoc:
609
+ self.continent = 'EU'
610
+ end
611
+ class SEN < Code #:nodoc:
612
+ self.continent = 'AF'
613
+ end
614
+ class SOM < Code #:nodoc:
615
+ self.continent = 'AF'
616
+ end
617
+ class SUR < Code #:nodoc:
618
+ self.continent = 'SA'
619
+ end
620
+ class STP < Code #:nodoc:
621
+ self.continent = 'AF'
622
+ end
623
+ class SLV < Code #:nodoc:
624
+ self.continent = 'NA'
625
+ end
626
+ class SYR < Code #:nodoc:
627
+ self.continent = 'AS'
628
+ end
629
+ class SWZ < Code #:nodoc:
630
+ self.continent = 'AF'
631
+ end
632
+ class TCA < Code #:nodoc:
633
+ self.continent = 'NA'
634
+ end
635
+ class TCD < Code #:nodoc:
636
+ self.continent = 'AF'
637
+ end
638
+ class ATF < Code #:nodoc:
639
+ self.continent = 'AN'
640
+ end
641
+ class TGO < Code #:nodoc:
642
+ self.continent = 'AF'
643
+ end
644
+ class THA < Code #:nodoc:
645
+ self.continent = 'AS'
646
+ end
647
+ class TJK < Code #:nodoc:
648
+ self.continent = 'AS'
649
+ end
650
+ class TKL < Code #:nodoc:
651
+ self.continent = 'OC'
652
+ end
653
+ class TLS < Code #:nodoc:
654
+ self.continent = 'AS'
655
+ end
656
+ class TKM < Code #:nodoc:
657
+ self.continent = 'AS'
658
+ end
659
+ class TUN < Code #:nodoc:
660
+ self.continent = 'AF'
661
+ end
662
+ class TON < Code #:nodoc:
663
+ self.continent = 'OC'
664
+ end
665
+ class TUR < Code #:nodoc:
666
+ self.continent = 'EU'
667
+ end
668
+ class TTO < Code #:nodoc:
669
+ self.continent = 'NA'
670
+ end
671
+ class TUV < Code #:nodoc:
672
+ self.continent = 'OC'
673
+ end
674
+ class TWN < Code #:nodoc:
675
+ self.continent = 'AS'
676
+ end
677
+ class TZA < Code #:nodoc:
678
+ self.continent = 'AF'
679
+ end
680
+ class UKR < Code #:nodoc:
681
+ self.continent = 'EU'
682
+ end
683
+ class UGA < Code #:nodoc:
684
+ self.continent = 'AF'
685
+ end
686
+ class UMI < Code #:nodoc:
687
+ self.continent = 'OC'
688
+ end
689
+ class USA < Code #:nodoc:
690
+ self.continent = 'NA'
691
+ end
692
+ class URY < Code #:nodoc:
693
+ self.continent = 'SA'
694
+ end
695
+ class UZB < Code #:nodoc:
696
+ self.continent = 'AS'
697
+ end
698
+ class VAT < Code #:nodoc:
699
+ self.continent = 'EU'
700
+ end
701
+ class VCT < Code #:nodoc:
702
+ self.continent = 'NA'
703
+ end
704
+ class VEN < Code #:nodoc:
705
+ self.continent = 'SA'
706
+ end
707
+ class VGB < Code #:nodoc:
708
+ self.continent = 'NA'
709
+ end
710
+ class VIR < Code #:nodoc:
711
+ self.continent = 'NA'
712
+ end
713
+ class VNM < Code #:nodoc:
714
+ self.continent = 'AS'
715
+ end
716
+ class VUT < Code #:nodoc:
717
+ self.continent = 'OC'
718
+ end
719
+ class WLF < Code #:nodoc:
720
+ self.continent = 'OC'
721
+ end
722
+ class WSM < Code #:nodoc:
723
+ self.continent = 'OC'
724
+ end
725
+ class YEM < Code #:nodoc:
726
+ self.continent = 'AS'
727
+ end
728
+ class MYT < Code #:nodoc:
729
+ self.continent = 'AF'
730
+ end
731
+ class ZAF < Code #:nodoc:
732
+ self.continent = 'AF'
733
+ end
734
+ class ZMB < Code #:nodoc:
735
+ self.continent = 'AF'
736
+ end
737
+ class ZWE < Code #:nodoc:
738
+ self.continent = 'AF'
739
+ end
740
+ end
741
+ end
@@ -5,4 +5,5 @@ require 'iso_country_codes/code'
5
5
  require 'iso_country_codes/iso_3166_1'
6
6
  require 'iso_country_codes/iso_4217'
7
7
  require 'iso_country_codes/calling'
8
+ require 'iso_country_codes/continent'
8
9
  require 'iso_country_codes/iso_country_codes'
@@ -162,6 +162,11 @@ class TestIsoCountryCodes < Test::Unit::TestCase
162
162
  assert_equal code.calling, code.calling_code
163
163
  end
164
164
 
165
+ def test_get_continent
166
+ assert_equal 'OC', IsoCountryCodes::Code::AUS.continent
167
+ assert_equal 'NA', IsoCountryCodes::Code::USA.continent
168
+ end
169
+
165
170
  def test_get_name
166
171
  assert_equal 'Australia', IsoCountryCodes::Code::AUS.name
167
172
  assert_equal 'Australia', IsoCountryCodes::Code::AUS.instance.name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iso_country_codes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rabarts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-23 00:00:00.000000000 Z
11
+ date: 2014-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,6 +86,7 @@ files:
86
86
  - lib/iso_country_codes.rb
87
87
  - lib/iso_country_codes/calling.rb
88
88
  - lib/iso_country_codes/code.rb
89
+ - lib/iso_country_codes/continent.rb
89
90
  - lib/iso_country_codes/iso_3166_1.rb
90
91
  - lib/iso_country_codes/iso_4217.rb
91
92
  - lib/iso_country_codes/iso_country_codes.rb
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  version: '0'
116
117
  requirements: []
117
118
  rubyforge_project:
118
- rubygems_version: 2.2.2
119
+ rubygems_version: 2.3.0
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: Provides ISO 3166-1 country codes/names and ISO 4217 currencies.