simple_monads 0.1.2 → 0.1.4

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: b54f2145f19fa895f6951fc9e0654cb53c48eeea6cfdc6a5ecd637a1e2c49b2c
4
- data.tar.gz: 2444529cb48f516bd4c87581bcebe6dcd67acdd7442534b423c88f74c992f3c7
3
+ metadata.gz: 78e5554b51686136830accd22720d81a7f38edf8d427b196d4cfe5feee9d3a15
4
+ data.tar.gz: fac5890a466f6532af1a601766738d76098d8236fbe5cc143b3bc290a4cb04a0
5
5
  SHA512:
6
- metadata.gz: 3a4a540a28a1ffb96f8a5cb8348688b0c411f8d6780217d47f98a0b59d4d490164f4fe3d5ae2bc1c5cf9abdd7cb6b60c6092d32efccc1939d6ef8a1987a1ed93
7
- data.tar.gz: aa48837f31b27ed918ddd37528ac6b112146682f158d0f9fb183623aba0687532ec4e93b97bb981a3bfd3069dd7657de30d5be5a783caf40ed82b9227746de6a
6
+ metadata.gz: 7029c2208181904091bba7f2f0c676969e68066eb33a57945997124d746a9df0a20f6b08c17545acd8fb36681d490c2f466f8ee643ea19edb3acae48aa5ffac8
7
+ data.tar.gz: ac7b894bc4a75e108aeadb15e193a808ce527d5231a2606797f72bb315b0e6e5119cb504616da00c67e4cac1cf1bfc7c5e4e214b299e9b60f61787fe3eae9c98
@@ -4,8 +4,9 @@ module SimpleMonads
4
4
  # failure object
5
5
  class FailureObject
6
6
  attr_reader :object
7
+ alias failure object
7
8
 
8
- def initialize(object)
9
+ def initialize(object = nil)
9
10
  @object = object
10
11
  end
11
12
 
@@ -4,8 +4,9 @@ module SimpleMonads
4
4
  # success object
5
5
  class SuccessObject
6
6
  attr_reader :object
7
+ alias success object
7
8
 
8
- def initialize(object)
9
+ def initialize(object = nil)
9
10
  @object = object
10
11
  end
11
12
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleMonads
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.4'
5
5
  end
data/lib/simple_monads.rb CHANGED
@@ -5,11 +5,11 @@ require_relative 'simple_monads/success_object'
5
5
 
6
6
  # Main module
7
7
  module SimpleMonads
8
- def Success(object) # rubocop:disable Naming/MethodName
8
+ def Success(object = nil) # rubocop:disable Naming/MethodName
9
9
  SuccessObject.new(object)
10
10
  end
11
11
 
12
- def Failure(object) # rubocop:disable Naming/MethodName
12
+ def Failure(object = nil) # rubocop:disable Naming/MethodName
13
13
  FailureObject.new(object)
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_monads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Leonov