ex_aequo_base 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ex_aequo/base/result.rb +6 -1
- data/lib/ex_aequo/base/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae43d869cc29935b130eb6e48ae7c674725fe5ebdaefbe93c460f2d047263296
|
4
|
+
data.tar.gz: f2ce0ef4590cbbb63653d201115c54d9f768779b172cdfb857a851392f1b8bf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f464381683510725cdc14d8fd02717a049b3cd52a846d1ece287fcf10ad9ae5ccf21e813e4e9c1bf6bbc29661385251b9fcf9e79729ab6e6df5eeee034c55fed
|
7
|
+
data.tar.gz: 365afb40f77c98b6d2e1091df35bb98bca19d40be3ae13a69acae569e9678468300aa356bbf68f06566a1dc3c824e53736990844a2130e878361c843d3f8ba7c
|
data/lib/ex_aequo/base/result.rb
CHANGED
@@ -13,11 +13,16 @@ module ExAequo
|
|
13
13
|
@error
|
14
14
|
end
|
15
15
|
|
16
|
+
def ==(other)
|
17
|
+
return false unless self.class === other
|
18
|
+
to_h == other.to_h
|
19
|
+
end
|
20
|
+
|
16
21
|
def extract(&blk)
|
17
22
|
return @result if @ok
|
18
23
|
|
19
24
|
raise IllegalState, "must not extract from a failure result without a block (#{@error})" unless blk
|
20
|
-
blk.()
|
25
|
+
blk.(self)
|
21
26
|
end
|
22
27
|
|
23
28
|
def if_failure(&blk)
|