Class: OmniEvent::BaseProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/omni_event/base_processor.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_stepObject (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

#eventObject (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_listObject



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