Class: Asyncapi::Client::CallbackRunner

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

Class Method Summary collapse

Instance Method Summary collapse

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_idObject

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

#callObject



22
23
24
# File 'app/models/asyncapi/client/callback_runner.rb', line 22

def call
  fail StandardError, "over-ride me"
end

#jobObject



26
27
28
# File 'app/models/asyncapi/client/callback_runner.rb', line 26

def job
  @job ||= Job.find(job_id)
end