Class: Qs::DispatchJob
Constant Summary
Constants inherited from Job
Instance Attribute Summary
Attributes inherited from Job
Attributes inherited from Message
Class Method Summary collapse
Instance Method Summary collapse
- #event ⇒ Object
-
#initialize(event_channel, event_name, options = nil) ⇒ DispatchJob
constructor
A new instance of DispatchJob.
Methods inherited from Job
Methods inherited from Message
Constructor Details
#initialize(event_channel, event_name, options = nil) ⇒ DispatchJob
Returns a new instance of DispatchJob.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/qs/dispatch_job.rb', line 17 def initialize(event_channel, event_name, = nil) ||= {} event_params = .delete(:event_params) || {} event_publisher = .delete(:event_publisher) || Qs.event_publisher [:params] = { 'event_channel' => event_channel, 'event_name' => event_name, 'event_params' => event_params, 'event_publisher' => event_publisher } super(Qs.dispatcher_job_name, ) end |
Class Method Details
Instance Method Details
#event ⇒ Object
30 31 32 |
# File 'lib/qs/dispatch_job.rb', line 30 def event @event ||= self.class.event(self) end |