greek-cities 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/lib/gc.rb +3 -0
  4. data/lib/gc/cities/ahaia.yml +17 -0
  5. data/lib/gc/cities/aitoloakarnania.yml +24 -0
  6. data/lib/gc/cities/argolida.yml +14 -0
  7. data/lib/gc/cities/arkadia.yml +17 -0
  8. data/lib/gc/cities/arta.yml +14 -0
  9. data/lib/gc/cities/attiki.yml +200 -0
  10. data/lib/gc/cities/boiotia.yml +20 -0
  11. data/lib/gc/cities/dodekanisa.yml +47 -0
  12. data/lib/gc/cities/drama.yml +17 -0
  13. data/lib/gc/cities/evros.yml +17 -0
  14. data/lib/gc/cities/eyrytania.yml +11 -0
  15. data/lib/gc/cities/eyvoia.yml +26 -0
  16. data/lib/gc/cities/florina.yml +11 -0
  17. data/lib/gc/cities/fokida.yml +9 -0
  18. data/lib/gc/cities/fthiotida.yml +23 -0
  19. data/lib/gc/cities/grevena.yml +8 -0
  20. data/lib/gc/cities/halkidiki.yml +17 -0
  21. data/lib/gc/cities/hania.yml +23 -0
  22. data/lib/gc/cities/hios.yml +8 -0
  23. data/lib/gc/cities/ilia.yml +23 -0
  24. data/lib/gc/cities/imathia.yml +11 -0
  25. data/lib/gc/cities/ioannina.yml +26 -0
  26. data/lib/gc/cities/irakleio.yml +23 -0
  27. data/lib/gc/cities/karditsa.yml +20 -0
  28. data/lib/gc/cities/kastoria.yml +11 -0
  29. data/lib/gc/cities/kavala.yml +14 -0
  30. data/lib/gc/cities/kefallonia.yml +8 -0
  31. data/lib/gc/cities/kerkira.yml +8 -0
  32. data/lib/gc/cities/kiklades.yml +60 -0
  33. data/lib/gc/cities/kilkis.yml +8 -0
  34. data/lib/gc/cities/korinthos.yml +20 -0
  35. data/lib/gc/cities/kozani.yml +14 -0
  36. data/lib/gc/cities/lakonia.yml +17 -0
  37. data/lib/gc/cities/larisa.yml +23 -0
  38. data/lib/gc/cities/lasithi.yml +11 -0
  39. data/lib/gc/cities/lefkada.yml +8 -0
  40. data/lib/gc/cities/lesvos.yml +11 -0
  41. data/lib/gc/cities/magnisia.yml +26 -0
  42. data/lib/gc/cities/messinia.yml +20 -0
  43. data/lib/gc/cities/pella.yml +14 -0
  44. data/lib/gc/cities/pieria.yml +11 -0
  45. data/lib/gc/cities/preveza.yml +11 -0
  46. data/lib/gc/cities/rethymno.yml +17 -0
  47. data/lib/gc/cities/rodopi.yml +14 -0
  48. data/lib/gc/cities/samos.yml +11 -0
  49. data/lib/gc/cities/serres.yml +23 -0
  50. data/lib/gc/cities/thesprotia.yml +11 -0
  51. data/lib/gc/cities/thessaloniki.yml +44 -0
  52. data/lib/gc/cities/trikala.yml +14 -0
  53. data/lib/gc/cities/xanthi.yml +14 -0
  54. data/lib/gc/cities/zakinthos.yml +5 -0
  55. data/lib/gc/city.rb +59 -57
  56. data/lib/gc/helpers/load_files.rb +13 -0
  57. data/lib/gc/states.rb +1 -55
  58. data/lib/gc/states.yml +155 -0
  59. data/lib/gc/version.rb +1 -1
  60. metadata +58 -56
  61. data/lib/gc/cities/ahaia.rb +0 -13
  62. data/lib/gc/cities/aitoloakarnania.rb +0 -15
  63. data/lib/gc/cities/argolida.rb +0 -12
  64. data/lib/gc/cities/arkadia.rb +0 -13
  65. data/lib/gc/cities/arta.rb +0 -12
  66. data/lib/gc/cities/attiki.rb +0 -74
  67. data/lib/gc/cities/boiotia.rb +0 -14
  68. data/lib/gc/cities/dodekanisa.rb +0 -23
  69. data/lib/gc/cities/drama.rb +0 -13
  70. data/lib/gc/cities/evros.rb +0 -13
  71. data/lib/gc/cities/eyrytania.rb +0 -11
  72. data/lib/gc/cities/eyvoia.rb +0 -16
  73. data/lib/gc/cities/florina.rb +0 -11
  74. data/lib/gc/cities/fokida.rb +0 -10
  75. data/lib/gc/cities/fthiotida.rb +0 -15
  76. data/lib/gc/cities/grevena.rb +0 -10
  77. data/lib/gc/cities/halkidiki.rb +0 -13
  78. data/lib/gc/cities/hania.rb +0 -15
  79. data/lib/gc/cities/hios.rb +0 -10
  80. data/lib/gc/cities/ilia.rb +0 -15
  81. data/lib/gc/cities/imathia.rb +0 -11
  82. data/lib/gc/cities/ioannina.rb +0 -16
  83. data/lib/gc/cities/irakleio.rb +0 -15
  84. data/lib/gc/cities/karditsa.rb +0 -14
  85. data/lib/gc/cities/kastoria.rb +0 -11
  86. data/lib/gc/cities/kavala.rb +0 -12
  87. data/lib/gc/cities/kefallonia.rb +0 -10
  88. data/lib/gc/cities/kerkira.rb +0 -10
  89. data/lib/gc/cities/kiklades.rb +0 -27
  90. data/lib/gc/cities/kilkis.rb +0 -10
  91. data/lib/gc/cities/korinthos.rb +0 -14
  92. data/lib/gc/cities/kozani.rb +0 -12
  93. data/lib/gc/cities/lakonia.rb +0 -13
  94. data/lib/gc/cities/larisa.rb +0 -15
  95. data/lib/gc/cities/lasithi.rb +0 -11
  96. data/lib/gc/cities/lefkada.rb +0 -10
  97. data/lib/gc/cities/lesvos.rb +0 -11
  98. data/lib/gc/cities/magnisia.rb +0 -16
  99. data/lib/gc/cities/messinia.rb +0 -14
  100. data/lib/gc/cities/pella.rb +0 -12
  101. data/lib/gc/cities/pieria.rb +0 -11
  102. data/lib/gc/cities/preveza.rb +0 -11
  103. data/lib/gc/cities/rethymno.rb +0 -13
  104. data/lib/gc/cities/rodopi.rb +0 -12
  105. data/lib/gc/cities/samos.rb +0 -11
  106. data/lib/gc/cities/serres.rb +0 -15
  107. data/lib/gc/cities/thesprotia.rb +0 -11
  108. data/lib/gc/cities/thessaloniki.rb +0 -22
  109. data/lib/gc/cities/trikala.rb +0 -12
  110. data/lib/gc/cities/xanthi.rb +0 -12
  111. data/lib/gc/cities/zakinthos.rb +0 -9
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Αγιος Νικόλαος'
5
+ - 'ag-nikolaos-LAS'
6
+ -
7
+ - 'Σητεία'
8
+ - 'siteia-LAS'
9
+ -
10
+ - 'Ιεράπετρα'
11
+ - 'ierapetra-LAS'
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Λευκάδα'
5
+ - 'lefkada-LEF'
6
+ -
7
+ - 'Μεγανήσι'
8
+ - 'meganisi-LEF'
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Μυτιλήνη'
5
+ - 'mitilini-LES'
6
+ -
7
+ - 'Μύρινα'
8
+ - 'mirina-LES'
9
+ -
10
+ - 'Άγιος Ευστράτιος'
11
+ - 'ag-efstratios-LES'
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Βόλος'
5
+ - 'volos-MAG'
6
+ -
7
+ - 'Βελεστίνο'
8
+ - 'velestino-MAG'
9
+ -
10
+ - 'Ζαγορά'
11
+ - 'zagora-MAG'
12
+ -
13
+ - 'Αλμυρός'
14
+ - 'almiros-MAG'
15
+ -
16
+ - 'Αργαλαστή'
17
+ - 'argalasti-MAG'
18
+ -
19
+ - 'Αλόννησος'
20
+ - 'alonnisos-MAG'
21
+ -
22
+ - 'Σκιάθος'
23
+ - 'skiathos-MAG'
24
+ -
25
+ - 'Σκοπέλος'
26
+ - 'skopelos-MAG'
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Καλαμάτα'
5
+ - 'kalamata-MES'
6
+ -
7
+ - 'Μεσσήνη'
8
+ - 'messini-MES'
9
+ -
10
+ - 'Πύλος'
11
+ - 'pilos-MES'
12
+ -
13
+ - 'Κυπαρισσία'
14
+ - 'kiparissia-MES'
15
+ -
16
+ - 'Μελιγαλά'
17
+ - 'meligala-MES'
18
+ -
19
+ - 'Καρδαμύλη'
20
+ - 'kardamili-MES'
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Εδεσσα'
5
+ - 'edessa-PEL'
6
+ -
7
+ - 'Αριδαία'
8
+ - 'aridaia-PEL'
9
+ -
10
+ - 'Σκύδρα'
11
+ - 'skidra-PEL'
12
+ -
13
+ - 'Γιαννιτσά'
14
+ - 'giannitsa-PEL'
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Λιτόχωρο'
5
+ - 'litohoro-PIE'
6
+ -
7
+ - 'Αιγίνιο'
8
+ - 'aiginio-PIE'
9
+ -
10
+ - 'Κατερίνη'
11
+ - 'katerini-PIE'
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Πρέβεζα'
5
+ - 'preveza-PRE'
6
+ -
7
+ - 'Καναλάκι'
8
+ - 'kanalaki-PRE'
9
+ -
10
+ - 'Φιλιππιάδα'
11
+ - 'filippiada-PRE'
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Ρέθυμνο'
5
+ - 'rethimno-RET'
6
+ -
7
+ - 'Πέραμα'
8
+ - 'perama-RET'
9
+ -
10
+ - 'Αγία Φωτεινή'
11
+ - 'ag-foteini-RET'
12
+ -
13
+ - 'Σπήλι'
14
+ - 'spili-RET'
15
+ -
16
+ - 'Ανώγεια'
17
+ - 'anogeia-RET'
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Κομοτηνή'
5
+ - 'komotini-ROD'
6
+ -
7
+ - 'Ιασμός'
8
+ - 'iasmos-ROD'
9
+ -
10
+ - 'Σάπες'
11
+ - 'sapes-ROD'
12
+ -
13
+ - 'Φιλλύρα'
14
+ - 'fillyra-ROD'
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Σάμος'
5
+ - 'samos-SAM'
6
+ -
7
+ - 'Αγιος Κήρυκος'
8
+ - 'ag-kirikos-SAM'
9
+ -
10
+ - 'Φούρνος Κορσεών'
11
+ - 'fournos-korseon-SAM'
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Σέρρες'
5
+ - 'serres-SER'
6
+ -
7
+ - 'Σιδηρόκαστρο'
8
+ - 'sidirokastro-SER'
9
+ -
10
+ - 'Νιγρίτα'
11
+ - 'nigrita-SER'
12
+ -
13
+ - 'Χρυσό'
14
+ - 'hriso-SER'
15
+ -
16
+ - 'Ροδολίβος'
17
+ - 'rodolivos-SER'
18
+ -
19
+ - 'Νέα Ζίχνη'
20
+ - 'nea-zihni-SER'
21
+ -
22
+ - 'Ηράκλεια'
23
+ - 'irakleia-SER'
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Ηγουμενίτσα'
5
+ - 'igoumenitsa-THESP'
6
+ -
7
+ - 'Φιλιάτες'
8
+ - 'filiates-THESP'
9
+ -
10
+ - 'Παραμυθιά'
11
+ - 'paramithia-THESP'
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Θεσσαλονίκη'
5
+ - 'thessaloniki-THESS'
6
+ -
7
+ - 'Κορδελιό - Εύοσμο'
8
+ - 'kordelio-euosmo-THESS'
9
+ -
10
+ - 'Νεάπολη - Συκιές'
11
+ - 'neapoli-sikies-THESS'
12
+ -
13
+ - 'Σταυρούπολη'
14
+ - 'stavroupoli-THESS'
15
+ -
16
+ - 'Αμπελόκηποι'
17
+ - 'ampelokipoi-THESS'
18
+ -
19
+ - 'Πανόραμα'
20
+ - 'panorama-THESS'
21
+ -
22
+ - 'Κουφάλια'
23
+ - 'koufalia-THESS'
24
+ -
25
+ - 'Σίνδος'
26
+ - 'sindos-THESS'
27
+ -
28
+ - 'Ωραιόκαστρο'
29
+ - 'oraiokastro-THESS'
30
+ -
31
+ - 'Λαγκαδάς'
32
+ - 'lagkadas-THESS'
33
+ -
34
+ - 'Περαία'
35
+ - 'peraia-THESS'
36
+ -
37
+ - 'θέρμη'
38
+ - 'thermi-THESS'
39
+ -
40
+ - 'Σταυρός'
41
+ - 'stavros-THESS'
42
+ -
43
+ - 'Καλαμαριά'
44
+ - 'kalamaria-THESS'
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Πύλη'
5
+ - 'pili-TRI'
6
+ -
7
+ - 'Φαρκαδόνα'
8
+ - 'farkadona-TRI'
9
+ -
10
+ - 'Τρίκαλα'
11
+ - 'trikala-TRI'
12
+ -
13
+ - 'Καλαμπάκα'
14
+ - 'kalampaka-TRI'
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Ξάνθη'
5
+ - 'xanthi-XAN'
6
+ -
7
+ - 'Σμίνθη'
8
+ - 'sminthi-XAN'
9
+ -
10
+ - 'Γενισσέα'
11
+ - 'genissea-XAN'
12
+ -
13
+ - 'Τόπειρος'
14
+ - 'topeiros-XAN'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ -
4
+ - 'Ζάκυνθος'
5
+ - 'zakinthos-ZAK'
@@ -1,63 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Dir[File.dirname(__FILE__) + "/cities/*.rb"].each { |file| require file }
4
-
5
3
  module GC
6
4
  module City
7
- CITY_HASH = {
8
- aha: GC::Cities::AHAIA,
9
- ait: GC::Cities::AITOLOAKARNANIA,
10
- arg: GC::Cities::ARGOLIDA,
11
- ark: GC::Cities::ARKADIA,
12
- art: GC::Cities::ARTA,
13
- att: GC::Cities::ATTIKI,
14
- boi: GC::Cities::BOIOTIA,
15
- dod: GC::Cities::DODEKANISA,
16
- dra: GC::Cities::DRAMA,
17
- evr: GC::Cities::EVROS,
18
- eyr: GC::Cities::EYRYTANIA,
19
- eyv: GC::Cities::EYVOIA,
20
- flo: GC::Cities::FLORINA,
21
- fok: GC::Cities::FOKIDA,
22
- fth: GC::Cities::FTHIOTIDA,
23
- gre: GC::Cities::GREVENA,
24
- hal: GC::Cities::HALKIDIKI,
25
- han: GC::Cities::HANIA,
26
- hio: GC::Cities::HIOS,
27
- ili: GC::Cities::ILIA,
28
- ima: GC::Cities::IMATHIA,
29
- ioa: GC::Cities::IOANNINA,
30
- ira: GC::Cities::IRAKLEIO,
31
- kar: GC::Cities::KARDITSA,
32
- kas: GC::Cities::KASTORIA,
33
- kav: GC::Cities::KAVALA,
34
- kef: GC::Cities::KEFALLONIA,
35
- ker: GC::Cities::KERKIRA,
36
- kik: GC::Cities::KIKLADES,
37
- kil: GC::Cities::KILKIS,
38
- kor: GC::Cities::KORINTHOS,
39
- koz: GC::Cities::KOZANI,
40
- lak: GC::Cities::LAKONIA,
41
- lar: GC::Cities::LARISA,
42
- las: GC::Cities::LASITHI,
43
- lef: GC::Cities::LEFKADA,
44
- les: GC::Cities::LESVOS,
45
- mag: GC::Cities::MAGNISIA,
46
- mes: GC::Cities::MESSINIA,
47
- pel: GC::Cities::PELLA,
48
- pie: GC::Cities::PIERIA,
49
- pre: GC::Cities::PREVEZA,
50
- ret: GC::Cities::RETHYMNO,
51
- rod: GC::Cities::RODOPI,
52
- sam: GC::Cities::SAMOS,
53
- ser: GC::Cities::SERRES,
54
- thesp: GC::Cities::THESPROTIA,
55
- thess: GC::Cities::THESSALONIKI,
56
- tri: GC::Cities::TRIKALA,
57
- xan: GC::Cities::XANTHI,
58
- zak: GC::Cities::ZAKINTHOS
59
- }.freeze
60
-
61
5
  def get_city_name(state_code, city)
62
6
  cities_by_code = cities(state_code)
63
7
  cities_hash = cities_by_code.map(&:reverse).to_h
@@ -65,7 +9,65 @@ module GC
65
9
  end
66
10
 
67
11
  def cities(code)
68
- CITY_HASH[code.downcase.to_sym] || raise('city not found')
12
+ cities_hash_table[code.downcase.to_sym] || raise('city not found')
13
+ end
14
+
15
+ private
16
+
17
+ def cities_hash_table
18
+ @cities_hash_table ||= {
19
+ aha: GC::Helpers::LoadFiles.load('/cities/ahaia.yml'),
20
+ ait: GC::Helpers::LoadFiles.load('/cities/aitoloakarnania.yml'),
21
+ arg: GC::Helpers::LoadFiles.load('/cities/argolida.yml'),
22
+ ark: GC::Helpers::LoadFiles.load('/cities/arkadia.yml'),
23
+ art: GC::Helpers::LoadFiles.load('/cities/arta.yml'),
24
+ att: GC::Helpers::LoadFiles.load('/cities/attiki.yml'),
25
+ boi: GC::Helpers::LoadFiles.load('/cities/boiotia.yml'),
26
+ dod: GC::Helpers::LoadFiles.load('/cities/dodekanisa.yml'),
27
+ dra: GC::Helpers::LoadFiles.load('/cities/drama.yml'),
28
+ evr: GC::Helpers::LoadFiles.load('/cities/evros.yml'),
29
+ eyr: GC::Helpers::LoadFiles.load('/cities/eyrytania.yml'),
30
+ eyv: GC::Helpers::LoadFiles.load('/cities/eyvoia.yml'),
31
+ flo: GC::Helpers::LoadFiles.load('/cities/florina.yml'),
32
+ fok: GC::Helpers::LoadFiles.load('/cities/fokida.yml'),
33
+ fth: GC::Helpers::LoadFiles.load('/cities/fthiotida.yml'),
34
+ gre: GC::Helpers::LoadFiles.load('/cities/grevena.yml'),
35
+ hal: GC::Helpers::LoadFiles.load('/cities/halkidiki.yml'),
36
+ han: GC::Helpers::LoadFiles.load('/cities/hania.yml'),
37
+ hio: GC::Helpers::LoadFiles.load('/cities/hios.yml'),
38
+ ili: GC::Helpers::LoadFiles.load('/cities/ilia.yml'),
39
+ ima: GC::Helpers::LoadFiles.load('/cities/imathia.yml'),
40
+ ioa: GC::Helpers::LoadFiles.load('/cities/ioannina.yml'),
41
+ ira: GC::Helpers::LoadFiles.load('/cities/irakleio.yml'),
42
+ kar: GC::Helpers::LoadFiles.load('/cities/karditsa.yml'),
43
+ kas: GC::Helpers::LoadFiles.load('/cities/kastoria.yml'),
44
+ kav: GC::Helpers::LoadFiles.load('/cities/kavala.yml'),
45
+ kef: GC::Helpers::LoadFiles.load('/cities/kefallonia.yml'),
46
+ ker: GC::Helpers::LoadFiles.load('/cities/kerkira.yml'),
47
+ kik: GC::Helpers::LoadFiles.load('/cities/kiklades.yml'),
48
+ kil: GC::Helpers::LoadFiles.load('/cities/kilkis.yml'),
49
+ kor: GC::Helpers::LoadFiles.load('/cities/korinthos.yml'),
50
+ koz: GC::Helpers::LoadFiles.load('/cities/kozani.yml'),
51
+ lak: GC::Helpers::LoadFiles.load('/cities/lakonia.yml'),
52
+ lar: GC::Helpers::LoadFiles.load('/cities/larisa.yml'),
53
+ las: GC::Helpers::LoadFiles.load('/cities/lasithi.yml'),
54
+ lef: GC::Helpers::LoadFiles.load('/cities/lefkada.yml'),
55
+ les: GC::Helpers::LoadFiles.load('/cities/lesvos.yml'),
56
+ mag: GC::Helpers::LoadFiles.load('/cities/magnisia.yml'),
57
+ mes: GC::Helpers::LoadFiles.load('/cities/messinia.yml'),
58
+ pel: GC::Helpers::LoadFiles.load('/cities/pella.yml'),
59
+ pie: GC::Helpers::LoadFiles.load('/cities/pieria.yml'),
60
+ pre: GC::Helpers::LoadFiles.load('/cities/preveza.yml'),
61
+ ret: GC::Helpers::LoadFiles.load('/cities/rethymno.yml'),
62
+ rod: GC::Helpers::LoadFiles.load('/cities/rodopi.yml'),
63
+ sam: GC::Helpers::LoadFiles.load('/cities/samos.yml'),
64
+ ser: GC::Helpers::LoadFiles.load('/cities/serres.yml'),
65
+ thesp: GC::Helpers::LoadFiles.load('/cities/thesprotia.yml'),
66
+ thess: GC::Helpers::LoadFiles.load('/cities/thessaloniki.yml'),
67
+ tri: GC::Helpers::LoadFiles.load('/cities/trikala.yml'),
68
+ xan: GC::Helpers::LoadFiles.load('/cities/xanthi.yml'),
69
+ zak: GC::Helpers::LoadFiles.load('/cities/zakinthos.yml')
70
+ }
69
71
  end
70
72
  end
71
73
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yaml'
4
+
5
+ module GC
6
+ module Helpers
7
+ class LoadFiles
8
+ def self.load(file)
9
+ YAML.load_file(GC::APP_PATH + file)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,67 +2,13 @@
2
2
 
3
3
  module GC
4
4
  module States
5
- STATES = [
6
- %w[Αιτωλοακαρνανίας ait],
7
- %w[Αργολίδας arg],
8
- %w[Αρκαδίας ark],
9
- %w[Άρτας art],
10
- %w[Αττικής att],
11
- %w[Αχαΐας aha],
12
- %w[Βοιωτίας boi],
13
- %w[Γρεβενών gre],
14
- %w[Δράμας dra],
15
- %w[Δωδεκανήσου dod],
16
- %w[Έβρου evr],
17
- %w[Ευβοίας eyv],
18
- %w[Ευρυτανίας eyr],
19
- %w[Ζακύνθου zak],
20
- %w[Ηλείας ili],
21
- %w[Ημαθίας ima],
22
- %w[Ηρακλείου ira],
23
- %w[Θεσπρωτίας thesp],
24
- %w[Θεσσαλονίκης thess],
25
- %w[Ιωαννίνων ioa],
26
- %w[Καβάλας kav],
27
- %w[Καρδίτσας kar],
28
- %w[Καστοριάς kas],
29
- %w[Κερκύρας ker],
30
- %w[Κεφαλληνίας kef],
31
- %w[Κιλκίς kil],
32
- %w[Κοζάνης koz],
33
- %w[Κορινθίας kor],
34
- %w[Κυκλάδων kik],
35
- %w[Λακωνίας lak],
36
- %w[Λάρισας lar],
37
- %w[Λασιθίου las],
38
- %w[Λέσβου les],
39
- %w[Λευκάδας lef],
40
- %w[Μαγνησίας mag],
41
- %w[Μεσσηνίας mes],
42
- %w[Ξάνθης xan],
43
- %w[Πέλλας pel],
44
- %w[Πιερίας pie],
45
- %w[Πρεβέζης pre],
46
- %w[Ρεθύμνης ret],
47
- %w[Ροδόπης rod],
48
- %w[Σάμου sam],
49
- %w[Σερρών ser],
50
- %w[Τρικάλων tri],
51
- %w[Φθιώτιδας fth],
52
- %w[Φλώρινας flo],
53
- %w[Φωκίδας fok],
54
- %w[Χαλκιδικής hal],
55
- %w[Χανίων han],
56
- %w[Χίου hio]
57
- ].freeze
58
-
59
5
  def get_state_name(state)
60
6
  states_hash = states.map(&:reverse).to_h
61
7
  states_hash[state]
62
8
  end
63
9
 
64
10
  def states
65
- STATES
11
+ @states ||= GC::Helpers::LoadFiles.load('states.yml')
66
12
  end
67
13
  end
68
14
  end