module Synapse::EventBus::EventPublisher

Mixin for an object that wishes to easily be able to publish events to an event bus

Attributes

event_bus[RW]

@return [EventBus]

Protected Instance Methods

publish_event(event) click to toggle source

Publishes the given event object or event message to the configured event bus

@param [Object] event @return [undefined]

# File lib/synapse/event_bus/event_publisher.rb, line 14
def publish_event(event)
  @event_bus.publish(Domain::EventMessage.as_message(event))
end