Class: OmniEvent::BaseProcessor
- Inherits:
-
Object
- Object
- OmniEvent::BaseProcessor
- Defined in:
- lib/omni_event/base_processor.rb
Instance Attribute Summary collapse
-
#current_step ⇒ Object
readonly
Returns the value of attribute current_step.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event) ⇒ BaseProcessor
constructor
A new instance of BaseProcessor.
- #process! ⇒ Object
Constructor Details
#initialize(event) ⇒ BaseProcessor
Returns a new instance of BaseProcessor.
15 16 17 |
# File 'lib/omni_event/base_processor.rb', line 15 def initialize(event) @event = event end |
Instance Attribute Details
#current_step ⇒ Object (readonly)
Returns the value of attribute current_step.
5 6 7 |
# File 'lib/omni_event/base_processor.rb', line 5 def current_step @current_step end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
5 6 7 |
# File 'lib/omni_event/base_processor.rb', line 5 def event @event end |
Class Method Details
.steps(*method_names) ⇒ Object
7 8 9 |
# File 'lib/omni_event/base_processor.rb', line 7 def self.steps(*method_names) @steps_list = method_names end |
.steps_list ⇒ Object
11 12 13 |
# File 'lib/omni_event/base_processor.rb', line 11 def self.steps_list @steps_list || [] end |
Instance Method Details
#process! ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/omni_event/base_processor.rb', line 19 def process! self.class.steps_list.each do |method_name| execute_step(method_name) end rescue => e raise e end |