peco_selector 0.0.1 → 0.0.2

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: 32b13cd1192a194e8a04a96fac7dd0485dc733b2
4
- data.tar.gz: 8f3ec8501dde1d91e9659dd8eaa2eb62c2623191
3
+ metadata.gz: b6abf1e0ece31884864db6ae1d4658dc52af7f62
4
+ data.tar.gz: 83b73f32e95cba72104b6f9b0b175a50915f9094
5
5
  SHA512:
6
- metadata.gz: e866cfd5c0132f1efe3e818b744bab4504fd445cf2058c0030894616d2d975ffd3c168c611635f7aff6df147ae4e95f5dcf116d6785dcd387e62feab26d5fc23
7
- data.tar.gz: 0d02ff7498b7363d8c7997aa8a4defec024c47ed22d252dd9c79cfcf3baa53a4dde000f4619fc781b520e577d7711e0ffc5518871f2b753f3bae7bd3b8571505
6
+ metadata.gz: 67f597b0fe05ed053114b47fcbcf6ae89bd7d9610052f963847101d89e97beace5bc899ceab9da3d552ae7ec47d4350e908cb5f90334061cd43384f89499154c
7
+ data.tar.gz: 27663f0974dc9079275f3f0fb799945410b76b39ec1106a3ef4c0491e278f882df6726143864c22f656f028989e300af7b97691c4b48d161914b2ef24ae749b0
data/README.md CHANGED
@@ -16,10 +16,14 @@ And then execute:
16
16
 
17
17
  ## Usage
18
18
 
19
- ```
19
+ ```ruby
20
20
  bob = Object.new
21
21
  alice = Object.new
22
+
22
23
  result = PecoSelector.select_from(bob: bob, alice: alice)
24
+ # or
25
+ result = PecoSelector.select_from([['bob', bob], ['alice', alice]])
26
+
23
27
  result # => [bob]
24
28
  ```
25
29
 
@@ -30,7 +30,9 @@ module PecoSelector
30
30
  end
31
31
  end
32
32
 
33
- candidates.each_value.select do |value|
33
+ candidates.map do |_, value|
34
+ value
35
+ end.select do |value|
34
36
  object_ids.include?(value.object_id)
35
37
  end
36
38
  end
@@ -1,3 +1,3 @@
1
1
  module PecoSelector
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peco_selector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai