totally_lazy 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2UwOTI4NzkzYjg5ODZlN2MxNDJlYzdhMGE0MGUzYzRmNmZkNzM2Zg==
4
+ ZWJhZWJjMGM0NzhhNTc0NTMzM2FiMDNkM2FiZTc2NzBmMTgyNzYwZg==
5
5
  data.tar.gz: !binary |-
6
- MTZjNjBkYTU5ZGI4ODJjNjkwMDU1MzE0NWQwNDJiYzliNDEwZWNlZA==
6
+ ZDIwNmViZjk5OWUxZjY1MjUxMzMzZjljNjM2ZWVhNDY5OWFjMWUyOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjE0YTY1YzYwZGZkZmJhN2NjYjdkMDQwMDY5YzBlMDkxYTFiYTAyYWFkNWQw
10
- YzNjOTcxZWU0ZTQwOGVjMzJhZWYzMTE4YWU3MDEwZGZiNTE2ZDQ5N2I0OGZk
11
- YzljMmRlM2Q5Y2U4MWQ5ZjMxYmE2ZTJjOTM0OTg1MDA5NjAxZTg=
9
+ ZTI5YmRiMTc5MGIxMzUxMGRlNmY4MWJhMjA5ZTAyOGIxZmI5NGM0NjQzZDRl
10
+ NGY5Y2Q3MWI5YzFkYmY2ZGFmNWJhZDhhZjVlYjRiZDU1ZTE0NDdhYWFkMWU5
11
+ MjI1Zjg2MjQxMThiYTE4OTAyMWIzN2FjMzcxMWQxYTE4NmRhMTk=
12
12
  data.tar.gz: !binary |-
13
- MWZmZTgwNTM5NWRiY2VjZTI2MWRiMTUzMTRhYThiZWU5MmE3MzQ5YzJlMTBh
14
- YjBhMjE2M2UzNTQ1YTlkODA3MDFiYWJhMWZlNzFkZTRiZWFmNjYwMWI2Njc3
15
- ZjI3N2Y5MjJlMDM2NDM1MTYyNDBkNzU2MjRhYTQ5MjAyYjY1ZTk=
13
+ MjAxMjU5OWE5ODkyZWNhMzc4MDg4MzI3ZmUzZDA2MGFmNmFkOTIyMmE4ZDIz
14
+ ZWEwY2IxMWRmN2QyMTQzNDNiZDY3NjYwMTNhMDNkZjJlN2QwZTI4NzQ5ZDkz
15
+ YzRjZjIwYzFkNzA0Y2QyM2QxZTFkM2QyZWNmMWFmZTNiYmQwY2M=
@@ -3,6 +3,21 @@
3
3
  require_relative '../spec_helper'
4
4
 
5
5
  describe 'Either' do
6
+ it 'should support creating rights' do
7
+ either = right(3)
8
+ expect(either.is_right?).to eq(true)
9
+ expect(either.is_left?).to eq(false)
10
+ expect(either.right_value).to eq(3)
11
+ end
12
+
13
+ it 'should support creating lefts' do
14
+ exception = NoSuchElementException.new
15
+ either = left(exception)
16
+ expect(either.is_right?).to eq(false)
17
+ expect(either.is_left?).to eq(true)
18
+ expect(either.left_value).to eq(exception)
19
+ end
20
+
6
21
  it 'can be used in filter and map' do
7
22
  eithers = sequence(left('error'), right(3))
8
23
  expect(eithers.filter(is_left?).map(get_left)).to eq(sequence('error'))
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.31
4
+ version: 0.1.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raymond Barlow