Class: Larva::Processor
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#entity ⇒ Object
Returns the value of attribute entity.
-
#id ⇒ Object
Returns the value of attribute id.
-
#message ⇒ Object
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(raw_message) ⇒ Processor
constructor
A new instance of Processor.
- #process_with_logging ⇒ Object
Constructor Details
#initialize(raw_message) ⇒ Processor
Returns a new instance of Processor.
8 9 10 11 12 13 |
# File 'lib/larva/processor.rb', line 8 def initialize() = HashWithIndifferentAccess.new() @action = [:action] @entity = [:entity] @id = [:id] end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
7 8 9 |
# File 'lib/larva/processor.rb', line 7 def action @action end |
#entity ⇒ Object
Returns the value of attribute entity.
7 8 9 |
# File 'lib/larva/processor.rb', line 7 def entity @entity end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/larva/processor.rb', line 7 def id @id end |
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/larva/processor.rb', line 7 def end |
Class Method Details
.process(message) ⇒ Object
3 4 5 |
# File 'lib/larva/processor.rb', line 3 def self.process() new().process_with_logging end |
Instance Method Details
#process_with_logging ⇒ Object
15 16 17 18 |
# File 'lib/larva/processor.rb', line 15 def process_with_logging Propono.config.logger.info "Processing message: #{message}" || normal_process end |