Class: Ector::Multi::Result
- Inherits:
-
Object
- Object
- Ector::Multi::Result
- Defined in:
- lib/ector-multi/result.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #failure? ⇒ Boolean
-
#initialize(results, error = nil) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(results, error = nil) ⇒ Result
Returns a new instance of Result.
8 9 10 11 |
# File 'lib/ector-multi/result.rb', line 8 def initialize(results, error = nil) @results = results @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
6 7 8 |
# File 'lib/ector-multi/result.rb', line 6 def error @error end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
6 7 8 |
# File 'lib/ector-multi/result.rb', line 6 def results @results end |
Instance Method Details
#failure? ⇒ Boolean
17 18 19 |
# File 'lib/ector-multi/result.rb', line 17 def failure? !success? end |
#success? ⇒ Boolean
13 14 15 |
# File 'lib/ector-multi/result.rb', line 13 def success? !@error end |