Class: OctocatalogDiff::Util::Parallel::Result
- Inherits:
-
Object
- Object
- OctocatalogDiff::Util::Parallel::Result
- Defined in:
- lib/octocatalog-diff/util/parallel.rb
Overview
This class represents the result from a parallel task. The status is set to true (success), false (error), or nil (task was killed before it could complete). The exception (for failure) and output object (for success) are readable attributes. The validity of the results, determined by executing the ‘validate’ method of the Task, is available to be set and fetched.
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(opts = {}) ⇒ Result
Returns a new instance of Result.
53 54 55 56 57 58 |
# File 'lib/octocatalog-diff/util/parallel.rb', line 53 def initialize(opts = {}) @status = opts[:status] @exception = opts[:exception] @output = opts[:output] @args = opts.fetch(:args, {}) end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
50 51 52 |
# File 'lib/octocatalog-diff/util/parallel.rb', line 50 def args @args end |
#exception ⇒ Object
Returns the value of attribute exception.
51 52 53 |
# File 'lib/octocatalog-diff/util/parallel.rb', line 51 def exception @exception end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
50 51 52 |
# File 'lib/octocatalog-diff/util/parallel.rb', line 50 def output @output end |
#status ⇒ Object
Returns the value of attribute status.
51 52 53 |
# File 'lib/octocatalog-diff/util/parallel.rb', line 51 def status @status end |