Class: Junkfood::Ceb::Executors::EventExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/junkfood/ceb/executors/event_executor.rb

Overview

Processes the event from the event_bus. The event is saved. TODO: emit json serialized event to other listeners.

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object

Parameters:

  • event (BaseEvent)

    the event to save and perform.



29
30
31
# File 'lib/junkfood/ceb/executors/event_executor.rb', line 29

def call(event)
  event.save! if event.new_record?
end