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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 689ead17e28d9c0bf0b7b70d8f607ad8cfb838937159568b13b8acc0c832de5b
4
- data.tar.gz: 243c1f6494cf34f30a251792501f3cddb89512a290ca1a4a9db1d8cd096446cc
3
+ metadata.gz: f015c379026bb2c3cddfa8dd27998990e57d7cbb6d21e3f86e4a17ac6ba21327
4
+ data.tar.gz: 40da3026f453728c58ac3795e58785001795e3d6c076a817569fbc8aab5cdc5b
5
5
  SHA512:
6
- metadata.gz: 5f931fa4c52470ac1b74d473337940e5a19c13fe496f061d62bb54fa26949a6dc36b25577c1ce6e497cba4b84355f89be2351e50ebf2e3ac675035e7a8e51065
7
- data.tar.gz: 21a8a63cc77150ad9b812a2add7e81ff4aad80c069951bc8c326bea3c28565fe761cec3c035a8f98089194dd0f1051524ba96e5e9deacf3c55fd6d0c9162035a
6
+ metadata.gz: 518e5337c23bbcd41a27ffdede0d614135d68adb974a8ae9c29bbe1435f02fcd513868c70cd81a3c6d84b3b3390e775ce6530d21daf5aaab83d8691b5953aef9
7
+ data.tar.gz: 647af57561d6f097a5ae76ea2e0917c3109ca44b8df8f5a12e8e2d4a0b9e88f42a1f2240b47cdc526bc5e463bcda1a573bb1ff29c51d6af2937cab4cd045f292
data/.github/FUNDING.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  # These are supported funding model platforms
2
2
  ---
3
3
  github: [fnando]
4
- custom: ["https://paypal.me/[USER]/🍕"]
4
+ custom: ["https://paypal.me/nandovieira/🍕"]
@@ -24,9 +24,9 @@ jobs:
24
24
  - Gemfile
25
25
 
26
26
  steps:
27
- - uses: actions/checkout@v1
27
+ - uses: actions/checkout@v4
28
28
 
29
- - uses: actions/cache@v2
29
+ - uses: actions/cache@v4
30
30
  with:
31
31
  path: vendor/bundle
32
32
  key: >
data/CHANGELOG.md CHANGED
@@ -11,6 +11,10 @@ Prefix your message with one of the following:
11
11
  - [Security] in case of vulnerabilities.
12
12
  -->
13
13
 
14
+ ## 0.0.2
15
+
16
+ - [Added] Pattern matching support.
17
+
14
18
  ## 0.0.1
15
19
 
16
20
  - Initial release.
@@ -2,6 +2,11 @@
2
2
 
3
3
  module IronOxide
4
4
  module Aliases
5
+ Some = Option::SomeClass
6
+ None = Option::NoneClass
7
+ Ok = Result::OkClass
8
+ Err = Result::ErrClass
9
+
5
10
  def Some(value) # rubocop:disable Naming/MethodName
6
11
  Option::Some(value)
7
12
  end
@@ -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)
@@ -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) &&
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IronOxide
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
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.1
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.1
151
- changelog_uri: https://github.com/fnando/iron_oxide/tree/v0.0.1/CHANGELOG.md
152
- documentation_uri: https://github.com/fnando/iron_oxide/tree/v0.0.1/README.md
153
- license_uri: https://github.com/fnando/iron_oxide/tree/v0.0.1/LICENSE.md
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: