Class: Rabbit::EventHandler
- Inherits:
-
Object
- Object
- Rabbit::EventHandler
- Defined in:
- lib/rabbit/event_handler.rb
Class Attribute Summary collapse
-
.additional_job_configs ⇒ Object
Returns the value of attribute additional_job_configs.
-
.ignore_queue_conversion ⇒ Object
Returns the value of attribute ignore_queue_conversion.
-
.queue ⇒ Object
Returns the value of attribute queue.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#message_info ⇒ Object
Returns the value of attribute message_info.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Class Method Summary collapse
Instance Method Summary collapse
- #assign_attributes(attrs = {}) ⇒ Object
-
#initialize(message) ⇒ EventHandler
constructor
A new instance of EventHandler.
Constructor Details
#initialize(message) ⇒ EventHandler
Returns a new instance of EventHandler.
32 33 34 35 36 37 38 |
# File 'lib/rabbit/event_handler.rb', line 32 def initialize() assign_attributes(.data) self.data = .data self.project_id = .project_id self. = .arguments end |
Class Attribute Details
.additional_job_configs ⇒ Object
Returns the value of attribute additional_job_configs.
9 10 11 |
# File 'lib/rabbit/event_handler.rb', line 9 def additional_job_configs @additional_job_configs end |
.ignore_queue_conversion ⇒ Object
Returns the value of attribute ignore_queue_conversion.
9 10 11 |
# File 'lib/rabbit/event_handler.rb', line 9 def ignore_queue_conversion @ignore_queue_conversion end |
.queue ⇒ Object
Returns the value of attribute queue.
9 10 11 |
# File 'lib/rabbit/event_handler.rb', line 9 def queue @queue end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
6 7 8 |
# File 'lib/rabbit/event_handler.rb', line 6 def data @data end |
#message_info ⇒ Object
Returns the value of attribute message_info.
6 7 8 |
# File 'lib/rabbit/event_handler.rb', line 6 def @message_info end |
#project_id ⇒ Object
Returns the value of attribute project_id.
6 7 8 |
# File 'lib/rabbit/event_handler.rb', line 6 def project_id @project_id end |
Class Method Details
.inherited(subclass) ⇒ Object
11 12 13 14 15 |
# File 'lib/rabbit/event_handler.rb', line 11 def inherited(subclass) super subclass.ignore_queue_conversion = false subclass.additional_job_configs = {} end |
Instance Method Details
#assign_attributes(attrs = {}) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/rabbit/event_handler.rb', line 40 def assign_attributes(attrs = {}) attrs.each do |key, value| setter = "#{key}=" public_send(setter, value) if respond_to?(setter) end end |