totally_lazy 0.1.45 → 0.1.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/totally_lazy/predicates.rb +4 -0
- data/spec/totally_lazy/predicates_spec.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmM2NzAxZTc5YTMyOTZhOGRlZmExNjA0YWJlM2FlMGY4ZTliOTdkMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWRlOTNiNjJkZTcwNmI5ZjVhY2VkM2NkZWI5MDE5MDQwMmFmZDRiZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmIyNTFiZjJiNDRkYmEzM2Y4OTI3M2E3N2JiY2UwZGY0MjU5ZThjMzFhZDli
|
10
|
+
MDEyNGI2N2E1Njk0MDc3YWY3NjllMWQ4OWNhOWRmMTc4MDA1OGE0Mzg4Mjlh
|
11
|
+
ZjFjNTA2ODk2ZDUyNTc4YjYwNDBmMDdhNjI5NjE0NmVkODFlMTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWVlZTBiMWI4M2YxMTA0NzQ2Y2FkMWJlNDBkYzhlMGE3MTExNTZjZDU1NTJh
|
14
|
+
YTEzNTJkNmZjNjUwOTAzM2E1NDcxNDRlMDI5ZWM4OTQ0NjdkYjM4MDQ4OGJi
|
15
|
+
OGJlMTFiMjczMWVkYWQ0NTNmZDhiMzYzMjViNjdlOGI3YzQyMTY=
|
@@ -11,4 +11,21 @@ describe 'Predicates' do
|
|
11
11
|
expect(sequence('Stuff').find(equal_to?('Stuff'))).to eq(some('Stuff'))
|
12
12
|
expect(sequence('Stuff').find(is('Nothing'))).to eq(none)
|
13
13
|
end
|
14
|
+
|
15
|
+
class Person
|
16
|
+
attr_reader :name
|
17
|
+
attr_reader :age
|
18
|
+
|
19
|
+
def initialize(name, age)
|
20
|
+
@name = name
|
21
|
+
@age = age
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should allow where' do
|
26
|
+
raymond = Person.new('Raymond', 41)
|
27
|
+
mathilda = Person.new('Mathilda', 4)
|
28
|
+
age = ->(person) { person.age }
|
29
|
+
expect(sequence(raymond, mathilda).filter(where(age, greater_than(40)))).to eq(sequence(raymond))
|
30
|
+
end
|
14
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: totally_lazy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raymond Barlow
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby-edge
|