ine-places 0.1.6 → 0.1.7

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: 37968cbbe43babded7fa90ed6443e4a3bf468ab0
4
- data.tar.gz: a1a1cce2d4ddda066214c7687236ca9c57a15a96
3
+ metadata.gz: 8dea2da46a2d8388bbbdf52975fded71a2cf2b61
4
+ data.tar.gz: 6396146bd77eeebcbd4e19e60b28b828f2defbbb
5
5
  SHA512:
6
- metadata.gz: 3a962e604b8ffd396d685e004bdfac84e757795b5b8794e5fa8eb8d8389e8e80145ba3ea3686aba2f21f738db7c364c6c2cb9704a9123aa46a21b3930741b925
7
- data.tar.gz: ea1e7bb6c4089962ab6a09a9de2184fad1385affe22cd92e7ad914f69341a977e37d65be14450803b551bcb2dcd3315167703079cd2e2b5d8e1447a26a3a111a
6
+ metadata.gz: 4e22b2977b4e10d3185e444812247760087070b8bfd1f1c1ea1212ef6805330adef4abc9d146306898b84f6fc091f390cd271f0e7b90a5ee77f4e32d1d8f824f
7
+ data.tar.gz: 9540fcaadb016537685d38caf93e47f1a8ea488bf1769e3aeba42db2d308c4895fc309ae20c07f28de79183ec0b3e24a158e3674e138321ea027a6d027c866d5
@@ -7,6 +7,12 @@ class INE::Places::Place < OpenStruct
7
7
  collection_klass.records.select{ |place| place.province_id == province_id }
8
8
  end
9
9
 
10
+ def self.find_by_name_and_province_id(place_name, province_id)
11
+ raise ArgumentError if place_name.blank? || province_id.blank?
12
+
13
+ collection_klass.records.select{ |place| place.name == place_name && place.province_id == province_id.to_s }.first
14
+ end
15
+
10
16
  def data
11
17
  @data ||= OpenStruct.new
12
18
  end
@@ -1,5 +1,5 @@
1
1
  module INE
2
2
  module Places
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ine-places
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Blat
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-03 00:00:00.000000000 Z
11
+ date: 2016-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -143,9 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.4.5.1
146
+ rubygems_version: 2.5.1
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: An easy way to work with Spanish regions in Ruby
150
150
  test_files: []
151
- has_rdoc: