greek-cities 0.0.1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/greek-cities.rb +11 -0
- data/lib/greek-cities/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43a08679d6bedc5f432d62f7f8f82bab2f2a88ce
|
4
|
+
data.tar.gz: 66e9e0c6ef9fb1da36a932f99188d1fe436d5512
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0351b7477b3273b053a0f3b8017b637f8817a1c4053f0deb69c7503473fe1c9c274c271e47b322cf3b8ce8e7046be924c10e5f59d0c119d15834b3c3a624170b
|
7
|
+
data.tar.gz: f9df9c7b4b9b2fce094bef017ba1cd45e00eda6cedcc181c4f4afd08c8ac477ad34bc20146130fd30089c748c7899a8a9395a4f39a6ff9c7656fbb280c9ac224
|
data/README.md
CHANGED
data/lib/greek-cities.rb
CHANGED
@@ -9,4 +9,15 @@ module GC
|
|
9
9
|
def self.cities(code)
|
10
10
|
GreekCities::City.get_cities(code)
|
11
11
|
end
|
12
|
+
|
13
|
+
def self.get_state_name(state)
|
14
|
+
states_hash = GreekCities::STATES.map(&:reverse).to_h
|
15
|
+
states_hash[state]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.get_city_name(state_code, city)
|
19
|
+
cities = GreekCities::City.get_cities(state_code)
|
20
|
+
cities_hash = cities.map(&:reverse).to_h
|
21
|
+
cities_hash[city]
|
22
|
+
end
|
12
23
|
end
|
data/lib/greek-cities/version.rb
CHANGED