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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecc167d7ea5fe60069c5683338656ca849f2d892
4
- data.tar.gz: bb5247460df31fa4ae2cad97ec69e21c63267cb0
3
+ metadata.gz: f6eb17eeec355a479c42cc6163894e9cbcbe18e1
4
+ data.tar.gz: 8f6d89419ef27bc67f729dd187a02cac9b2e603c
5
5
  SHA512:
6
- metadata.gz: d5562d12eef0fafc7b604f9524cc6b46d7d3f31b3ecf79d9deb68b00c2198c8a896fe80293bd1a5022670eaf1c5ef016bd8d3846f8d95cb46e20fb53f86e53e5
7
- data.tar.gz: 3f766bb40d7fe3debf1f3244f1b8abff4b27bd0a0390c44ea2d4bbe7c2acfdc0a6748447d8562686d82345d84a0aafd219c0465b61eccb4b99b0f6ce1abb126a
6
+ metadata.gz: 4d5f50cf476ae0ca6a29050de60e0eebb77e785de092007fb8b61d69c661dae88307c1340f83fbb7d346b7e5e010a4428cbb04a91366fdde4ac79776891714a2
7
+ data.tar.gz: 35617595350d81bd11b1ca0ed2bcb9e6d5627dac253a5929038e4e57d44bbf0288a24278980fe66ee61f0793bb83dbd51c469e43390cb5465d0c38af60c9e1f6
data/.gitignore CHANGED
@@ -10,4 +10,4 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
- arbitrium-0.1.0.gem
13
+ *.gem
data/lib/arbitrium.rb CHANGED
@@ -1,6 +1,4 @@
1
- require 'arbitrium/version'
2
- require 'arbitrium/result'
1
+ Dir[File.dirname(__FILE__) + '/lib/*.rb'].each { |file| require file }
3
2
 
4
3
  module Arbitrium
5
- # Your code goes here...
6
4
  end
@@ -1,12 +1,15 @@
1
1
  module Arbitrium
2
- class Result < Struct.new(:success, :message, :result_object)
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
- super
9
- self.result_object ||= nil
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
@@ -1,3 +1,3 @@
1
1
  module Arbitrium
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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-30 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler