ex_aequo_base 0.3.4 → 0.3.6
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/open_struct.rb +1 -1
- data/lib/ex_aequo/base/result.rb +6 -1
- data/lib/ex_aequo/base/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ff2a4c65ddeb90b710d59541bdd65d65a01f1c18f2c8e9ed3dd47a6a7c1f94e
|
|
4
|
+
data.tar.gz: 87a189c76ba91b895d19959b215006acac360b194749d58d9b9846988e2da95d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bd8e58734b27da50f2086eec52060205e3be014322bf67125c5e1ea0315fb5d53d90b3b0400631d956990fd00a72fe13e9ca544d2f325fae7ef1c5908bec646
|
|
7
|
+
data.tar.gz: 922089df24881c670f01c79b24b79fd062c6f5a0128d99dba58b532ace37c6bee475b41b2863b9a8e921ebddbfa1907c3cf648f035fdf6c1e17be4bd4d0e59ef
|
|
@@ -4,7 +4,7 @@ require 'ostruct'
|
|
|
4
4
|
require_relative 'forwarder'
|
|
5
5
|
class OpenStruct
|
|
6
6
|
extend ExAequo::Base::Forwarder
|
|
7
|
-
forward_all :deconstruct_keys, :empty?, :fetch, :has_key?, to: :to_h
|
|
7
|
+
forward_all :deconstruct_keys, :empty?, :fetch, :has_key?, :to_hash, to: :to_h
|
|
8
8
|
|
|
9
9
|
def self.to_proc
|
|
10
10
|
-> hashy do
|
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)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ex_aequo_base
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Dober
|
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
101
|
version: '0'
|
|
102
102
|
requirements: []
|
|
103
|
-
rubygems_version: 3.7.
|
|
103
|
+
rubygems_version: 3.7.2
|
|
104
104
|
specification_version: 4
|
|
105
105
|
summary: The code I use all the time
|
|
106
106
|
test_files: []
|