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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7035a2ec94da66780f5ad89cc4cc1975a16633e2021b7bbc0366007ae5100773
4
- data.tar.gz: 10c5f2b8f40fdfebe315663551f954b16049ad84a6327fa78e3e29ac44f84fe0
3
+ metadata.gz: cefbbdd3cd2778148ca8d47bc1c7d9a0591e6ccb5b01572cb8a0475354da4926
4
+ data.tar.gz: '07589ff8a6d498b88aba6d7010a6fed1cc9535fd586a88af25d9df43c67e8d28'
5
5
  SHA512:
6
- metadata.gz: 8d4fbb1d0c9d670d2ae6073d293780de9ec232035732720779b205771f43239a0a3394673aa9f4317155ff6ec5eee8dc0f8fb142a8399363213b00da1b7ed4ee
7
- data.tar.gz: 1ecc708bdd34a381a034613ae6d85def2a846e2542e136b5de1542205fa55538dee83387ca4796400e6819eaf512875ba734079c50c3b70c42d0968888a8373b
6
+ metadata.gz: 7a5e149c679f5c5d585d2b8d40a9fa159dca6c25ce56f316e537cf456d3e1fef3ca613c1066a2d1e66822c3538c312d53052de83b5fcecb52513c38d16b5b782
7
+ data.tar.gz: 63740d6bb546ca508cb81422401e733b707c0881ac0ff4de439455b4eb2182bc6d29dab58b9d0bbeba1da7c78c3d6c591750c2ba291a549a5615e8fb41c8b1eb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mu-result (1.2.0)
4
+ mu-result (2.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
- @code == :ok
25
+ @is_success == true
25
26
  end
26
27
 
27
28
  def error?
@@ -1,5 +1,5 @@
1
1
  module Mu
2
2
  module Result
3
- VERSION = '1.2.0'
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
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: 1.2.0
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-01-05 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler