Class: Railbox::Processors::HandlerProcessor

Inherits:
Object
  • Object
show all
Extended by:
ActiveSupport::Concern
Defined in:
lib/railbox/processors/handler_processor.rb

Class Method Summary collapse

Class Method Details

.on_failure(record) ⇒ Object



14
15
16
17
18
# File 'lib/railbox/processors/handler_processor.rb', line 14

def on_failure(record)
  with_handler(record) do |handler, _action_data|
    handler.on_failure
  end
end

.process(record) ⇒ Object



8
9
10
11
12
# File 'lib/railbox/processors/handler_processor.rb', line 8

def process(record)
  with_handler(record) do |handler, action_data|
    handler.public_send(action_data[:method_name])
  end
end