simple-result 0.2.0 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4b2202fd6051515861246dd9f8b5eac8fcfffb4568a315b61d9a6e3249ad586
4
- data.tar.gz: 93b4fd473128ae64232c4fefa24925157cdf339fcea6a8fd995832b9bef7af4f
3
+ metadata.gz: 6a28433dee40d5469ac6b92034d61a4a68f31df8805cb4fb2c354ff76f5d3f28
4
+ data.tar.gz: 420d09302a2a8caa0eca7eb062af8bb96debd12e0ccad10646af7f251bbdc982
5
5
  SHA512:
6
- metadata.gz: 570cc8aad6f667cabe8063486be20992e832bf684a3f928f4755679d27f5c13fceb627fffdf913d05b34b30c7b577a970fc34f321e04aeba580c8313564ee2cd
7
- data.tar.gz: 69f4b2077916d24cf21a4c42f2c9954c2fb2c04f8c170daccb3de414c3d46eb6cf7ee3448987020d80fd58c6ec4b2f0e615e4a7855bab9c92c22487107ed89d0
6
+ metadata.gz: 7e5003ea1d2c8f8393fe07d7a59ccb3af12ae1af6d8e61a062bc8da97bef85df798373d638fcb5106c5ef8cf897aef4d5329f3e2e9931695f654533821a0da59
7
+ data.tar.gz: f15c62b67f3337f0dea4c3c0b55628604cbd9b730bc50caab048e06d2fd194eb29f4b575b92a3bf9dfdab0c6d24a1140dfa798a50811f3a14790fdacc9381b32
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SimpleResult
4
+ module Helpers
5
+ def Success(payload = nil) # rubocop:disable Naming/MethodName -- These are helpers methods defined specifically like this to look similar with the classes
6
+ SimpleResult::Success.new(payload)
7
+ end
8
+
9
+ def Failure(error = nil) # rubocop:disable Naming/MethodName -- These are helpers methods defined specifically like this to look similar with the classes
10
+ SimpleResult::Failure.new(error:)
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleResult
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
data/lib/simple_result.rb CHANGED
@@ -55,6 +55,3 @@ module SimpleResult
55
55
  def pretty_print(pp) = pp.text "#<data #{self.class.name} error=#{error.inspect}>"
56
56
  end
57
57
  end
58
-
59
- def Success(payload = nil) = SimpleResult::Success.new(payload) # rubocop:disable Naming/MethodName -- These are helpers methods defined specifically like this to look similar with the classes
60
- def Failure(error = nil) = SimpleResult::Failure.new(error:) # rubocop:disable Naming/MethodName -- These are helpers methods defined specifically like this to look similar with the classes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-result
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucian Ghinda
@@ -33,6 +33,7 @@ extra_rdoc_files: []
33
33
  files:
34
34
  - README.md
35
35
  - lib/simple_result.rb
36
+ - lib/simple_result/helpers.rb
36
37
  - lib/simple_result/version.rb
37
38
  homepage: https://github.com/lucianghinda/simple_result
38
39
  licenses: