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 +4 -4
- data/lib/ine/places/place.rb +6 -0
- data/lib/ine/places/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dea2da46a2d8388bbbdf52975fded71a2cf2b61
|
4
|
+
data.tar.gz: 6396146bd77eeebcbd4e19e60b28b828f2defbbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e22b2977b4e10d3185e444812247760087070b8bfd1f1c1ea1212ef6805330adef4abc9d146306898b84f6fc091f390cd271f0e7b90a5ee77f4e32d1d8f824f
|
7
|
+
data.tar.gz: 9540fcaadb016537685d38caf93e47f1a8ea488bf1769e3aeba42db2d308c4895fc309ae20c07f28de79183ec0b3e24a158e3674e138321ea027a6d027c866d5
|
data/lib/ine/places/place.rb
CHANGED
@@ -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
|
data/lib/ine/places/version.rb
CHANGED
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.
|
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-
|
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.
|
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:
|