array-where 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/array/where.rb +2 -2
- data/lib/array/where/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb53f3aaa87ec783c06a2b645773f32c8efeb6a8
|
4
|
+
data.tar.gz: 8aa295b09528e60d86b36d3ffcccd7092026706a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ebff95f65dfb892f99b69258072ce3247254fb16f10d53115183867a925a04e3d37c4429dcc8aa76e8ae57a0772cc4b8b7c6ced7cd0b225e1803e2d06ac0a32
|
7
|
+
data.tar.gz: 77d9f62fa0d307e03fa1c95d08ada403e47f944408e832e256c6163a8fcfa91517bb9edb4136eba36b2a1d4b0ad754c085046ffaba0c6186b842f24677051c79
|
data/lib/array/where.rb
CHANGED
@@ -5,7 +5,7 @@ class Array
|
|
5
5
|
def where(query)
|
6
6
|
self.select do |item|
|
7
7
|
query.all? do |method, value|
|
8
|
-
item.
|
8
|
+
item.public_send(method) == value
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -13,7 +13,7 @@ class Array
|
|
13
13
|
def wherein(query)
|
14
14
|
self.select do |item|
|
15
15
|
query.all? do |method, value|
|
16
|
-
value.call(item.
|
16
|
+
value.call(item.public_send(method))
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
data/lib/array/where/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: array-where
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kurtis Rainbolt-Greene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|