Class: RubyReactor::AsyncResult

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_reactor.rb

Overview

Async result for background job execution

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_id:, intermediate_results: {}) ⇒ AsyncResult

Returns a new instance of AsyncResult.



125
126
127
128
# File 'lib/ruby_reactor.rb', line 125

def initialize(job_id:, intermediate_results: {})
  @job_id = job_id
  @intermediate_results = intermediate_results
end

Instance Attribute Details

#intermediate_resultsObject (readonly)

Returns the value of attribute intermediate_results.



123
124
125
# File 'lib/ruby_reactor.rb', line 123

def intermediate_results
  @intermediate_results
end

#job_idObject (readonly)

Returns the value of attribute job_id.



123
124
125
# File 'lib/ruby_reactor.rb', line 123

def job_id
  @job_id
end

Instance Method Details

#async?Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/ruby_reactor.rb', line 130

def async?
  true
end

#failure?Boolean

Returns:

  • (Boolean)


138
139
140
# File 'lib/ruby_reactor.rb', line 138

def failure?
  false
end

#success?Boolean

Returns:

  • (Boolean)


134
135
136
# File 'lib/ruby_reactor.rb', line 134

def success?
  false
end