mu-result 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/mu/result.rb +2 -2
- data/lib/mu/result/base_result.rb +3 -2
- data/lib/mu/result/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: cefbbdd3cd2778148ca8d47bc1c7d9a0591e6ccb5b01572cb8a0475354da4926
|
4
|
+
data.tar.gz: '07589ff8a6d498b88aba6d7010a6fed1cc9535fd586a88af25d9df43c67e8d28'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a5e149c679f5c5d585d2b8d40a9fa159dca6c25ce56f316e537cf456d3e1fef3ca613c1066a2d1e66822c3538c312d53052de83b5fcecb52513c38d16b5b782
|
7
|
+
data.tar.gz: 63740d6bb546ca508cb81422401e733b707c0881ac0ff4de439455b4eb2182bc6d29dab58b9d0bbeba1da7c78c3d6c591750c2ba291a549a5615e8fb41c8b1eb
|
data/Gemfile.lock
CHANGED
data/lib/mu/result.rb
CHANGED
@@ -5,11 +5,11 @@ module Mu
|
|
5
5
|
module Result
|
6
6
|
|
7
7
|
def self.success(data = nil)
|
8
|
-
BaseResult.new(code: :ok, data: data)
|
8
|
+
BaseResult.new(is_success: true, code: :ok, data: data)
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.error(data = nil)
|
12
|
-
BaseResult.new(code: :ko, data: data)
|
12
|
+
BaseResult.new(is_success: false, code: :ko, data: data)
|
13
13
|
end
|
14
14
|
|
15
15
|
end
|
@@ -2,7 +2,8 @@ module Mu
|
|
2
2
|
module Result
|
3
3
|
|
4
4
|
class BaseResult
|
5
|
-
def initialize(code: :ok, data: nil)
|
5
|
+
def initialize(is_success: true, code: :ok, data: nil)
|
6
|
+
@is_success = is_success
|
6
7
|
@code = code
|
7
8
|
@data = data
|
8
9
|
end
|
@@ -21,7 +22,7 @@ module Mu
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def success?
|
24
|
-
@
|
25
|
+
@is_success == true
|
25
26
|
end
|
26
27
|
|
27
28
|
def error?
|
data/lib/mu/result/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mu-result
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- olistik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|