Class: Asyncapi::Client::CallbackRunner
- Inherits:
-
Object
- Object
- Asyncapi::Client::CallbackRunner
- Defined in:
- app/models/asyncapi/client/callback_runner.rb
Constant Summary collapse
- DELEGATED_ATTRS =
[ :callback_params, :body, :headers, :message, :response_code, ]
Instance Attribute Summary collapse
-
#job_id ⇒ Object
Returns the value of attribute job_id.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(job_id) ⇒ CallbackRunner
constructor
A new instance of CallbackRunner.
- #job ⇒ Object
Constructor Details
#initialize(job_id) ⇒ CallbackRunner
Returns a new instance of CallbackRunner.
18 19 20 |
# File 'app/models/asyncapi/client/callback_runner.rb', line 18 def initialize(job_id) self.job_id = job_id end |
Instance Attribute Details
#job_id ⇒ Object
Returns the value of attribute job_id.
4 5 6 |
# File 'app/models/asyncapi/client/callback_runner.rb', line 4 def job_id @job_id end |
Class Method Details
.call(job_id) ⇒ Object
14 15 16 |
# File 'app/models/asyncapi/client/callback_runner.rb', line 14 def self.call(job_id) self.new(job_id).call end |
Instance Method Details
#call ⇒ Object
22 23 24 |
# File 'app/models/asyncapi/client/callback_runner.rb', line 22 def call fail StandardError, "over-ride me" end |
#job ⇒ Object
26 27 28 |
# File 'app/models/asyncapi/client/callback_runner.rb', line 26 def job @job ||= Job.find(job_id) end |