Class: OctocatalogDiff::Util::Parallel::Result

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#argsObject (readonly)

Returns the value of attribute args


50
51
52
# File 'lib/octocatalog-diff/util/parallel.rb', line 50

def args
  @args
end

#exceptionObject

Returns the value of attribute exception


51
52
53
# File 'lib/octocatalog-diff/util/parallel.rb', line 51

def exception
  @exception
end

#outputObject (readonly)

Returns the value of attribute output


50
51
52
# File 'lib/octocatalog-diff/util/parallel.rb', line 50

def output
  @output
end

#statusObject

Returns the value of attribute status


51
52
53
# File 'lib/octocatalog-diff/util/parallel.rb', line 51

def status
  @status
end