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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08bc005f40f2dbc0579541396b2287a89cc3fae7
4
- data.tar.gz: df7bf00e775a79cccd45513cb32b26f5ff2afdb0
3
+ metadata.gz: 43a08679d6bedc5f432d62f7f8f82bab2f2a88ce
4
+ data.tar.gz: 66e9e0c6ef9fb1da36a932f99188d1fe436d5512
5
5
  SHA512:
6
- metadata.gz: f960dd671a0b111aeae63390a22deaa8fc0ed613faaf94485e1e2f2db50ac0c9ad3137c10ea953cd668df948f573acabf09788859d4ad75ab1a68427c2a2b592
7
- data.tar.gz: 6711bb2b1ef51c44938ce8813aa3357f1073d7db71474d9f0e674de66986eec8bf2e1faf0538a8b90cf34bce1a3cee602e7eb82578c6076e495059a0cf027f3d
6
+ metadata.gz: 0351b7477b3273b053a0f3b8017b637f8817a1c4053f0deb69c7503473fe1c9c274c271e47b322cf3b8ce8e7046be924c10e5f59d0c119d15834b3c3a624170b
7
+ data.tar.gz: f9df9c7b4b9b2fce094bef017ba1cd45e00eda6cedcc181c4f4afd08c8ac477ad34bc20146130fd30089c748c7899a8a9395a4f39a6ff9c7656fbb280c9ac224
data/README.md CHANGED
@@ -3,7 +3,7 @@ greek-cities gem includes all the states (nomous) of Greece and their biggest ci
3
3
 
4
4
  ## Install the gem
5
5
  ```ruby
6
- gem 'greek-cities'
6
+ gem 'greek-cities', '~> 0.0.1'
7
7
  ```
8
8
 
9
9
  ## List of all states
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GreekCities
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greek-cities
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Avlonitis