arbitrium 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/lib/arbitrium.rb +1 -3
- data/lib/arbitrium/result.rb +7 -8
- data/lib/arbitrium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6eb17eeec355a479c42cc6163894e9cbcbe18e1
|
4
|
+
data.tar.gz: 8f6d89419ef27bc67f729dd187a02cac9b2e603c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d5f50cf476ae0ca6a29050de60e0eebb77e785de092007fb8b61d69c661dae88307c1340f83fbb7d346b7e5e010a4428cbb04a91366fdde4ac79776891714a2
|
7
|
+
data.tar.gz: 35617595350d81bd11b1ca0ed2bcb9e6d5627dac253a5929038e4e57d44bbf0288a24278980fe66ee61f0793bb83dbd51c469e43390cb5465d0c38af60c9e1f6
|
data/.gitignore
CHANGED
data/lib/arbitrium.rb
CHANGED
data/lib/arbitrium/result.rb
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
module Arbitrium
|
2
|
-
class Result
|
2
|
+
class Result
|
3
|
+
attr_reader :success, :message, :object
|
4
|
+
|
3
5
|
def self.default_success(object = nil)
|
4
6
|
new(true, 'Completed successfully.', object)
|
5
7
|
end
|
6
8
|
|
7
|
-
def initialize(
|
8
|
-
|
9
|
-
|
9
|
+
def initialize(success, message, object = nil)
|
10
|
+
@success = success
|
11
|
+
@message = message
|
12
|
+
@object = object
|
10
13
|
end
|
11
14
|
|
12
15
|
def success?
|
@@ -16,9 +19,5 @@ module Arbitrium
|
|
16
19
|
def failure?
|
17
20
|
!success?
|
18
21
|
end
|
19
|
-
|
20
|
-
def object
|
21
|
-
self.result_object
|
22
|
-
end
|
23
22
|
end
|
24
23
|
end
|
data/lib/arbitrium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arbitrium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lollar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01
|
11
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|