iron_oxide 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 +4 -4
- data/.github/FUNDING.yml +1 -1
- data/.github/workflows/ruby-tests.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/lib/iron_oxide/aliases.rb +5 -0
- data/lib/iron_oxide/option.rb +9 -0
- data/lib/iron_oxide/result.rb +12 -0
- data/lib/iron_oxide/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f015c379026bb2c3cddfa8dd27998990e57d7cbb6d21e3f86e4a17ac6ba21327
|
4
|
+
data.tar.gz: 40da3026f453728c58ac3795e58785001795e3d6c076a817569fbc8aab5cdc5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518e5337c23bbcd41a27ffdede0d614135d68adb974a8ae9c29bbe1435f02fcd513868c70cd81a3c6d84b3b3390e775ce6530d21daf5aaab83d8691b5953aef9
|
7
|
+
data.tar.gz: 647af57561d6f097a5ae76ea2e0917c3109ca44b8df8f5a12e8e2d4a0b9e88f42a1f2240b47cdc526bc5e463bcda1a573bb1ff29c51d6af2937cab4cd045f292
|
data/.github/FUNDING.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/iron_oxide/aliases.rb
CHANGED
data/lib/iron_oxide/option.rb
CHANGED
@@ -5,6 +5,15 @@ module IronOxide
|
|
5
5
|
class Base
|
6
6
|
attr_reader :value
|
7
7
|
|
8
|
+
# Deconstructs the instance into an array.
|
9
|
+
def deconstruct
|
10
|
+
[value]
|
11
|
+
end
|
12
|
+
|
13
|
+
def deconstruct_keys(*)
|
14
|
+
{value:}
|
15
|
+
end
|
16
|
+
|
8
17
|
# Checks if the instance represents a `Some` value.
|
9
18
|
def some?
|
10
19
|
instance_of?(SomeClass)
|
data/lib/iron_oxide/result.rb
CHANGED
@@ -9,6 +9,18 @@ module IronOxide
|
|
9
9
|
@value = value
|
10
10
|
end
|
11
11
|
|
12
|
+
# Deconstructs the instance into an array, so it can be using on
|
13
|
+
# pattern matching.
|
14
|
+
def deconstruct
|
15
|
+
[value]
|
16
|
+
end
|
17
|
+
|
18
|
+
# Deconstructs the instance into a hash, so it can be using on
|
19
|
+
# pattern matching.
|
20
|
+
def deconstruct_keys(*)
|
21
|
+
{value:}
|
22
|
+
end
|
23
|
+
|
12
24
|
# Compares the current result with another result.
|
13
25
|
def ==(other)
|
14
26
|
Result.result?(other) &&
|
data/lib/iron_oxide/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_oxide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
@@ -147,10 +147,10 @@ metadata:
|
|
147
147
|
rubygems_mfa_required: 'true'
|
148
148
|
homepage_uri: https://github.com/fnando/iron_oxide
|
149
149
|
bug_tracker_uri: https://github.com/fnando/iron_oxide/issues
|
150
|
-
source_code_uri: https://github.com/fnando/iron_oxide/tree/v0.0.
|
151
|
-
changelog_uri: https://github.com/fnando/iron_oxide/tree/v0.0.
|
152
|
-
documentation_uri: https://github.com/fnando/iron_oxide/tree/v0.0.
|
153
|
-
license_uri: https://github.com/fnando/iron_oxide/tree/v0.0.
|
150
|
+
source_code_uri: https://github.com/fnando/iron_oxide/tree/v0.0.2
|
151
|
+
changelog_uri: https://github.com/fnando/iron_oxide/tree/v0.0.2/CHANGELOG.md
|
152
|
+
documentation_uri: https://github.com/fnando/iron_oxide/tree/v0.0.2/README.md
|
153
|
+
license_uri: https://github.com/fnando/iron_oxide/tree/v0.0.2/LICENSE.md
|
154
154
|
post_install_message:
|
155
155
|
rdoc_options: []
|
156
156
|
require_paths:
|