Module: Mumukit::Nuntius::EventPublisher

Defined in:
lib/mumukit/nuntius/event_publisher.rb

Class Method Summary collapse

Class Method Details

.publish(event, payload, **options) ⇒ Object



5
6
7
8
# File 'lib/mumukit/nuntius/event_publisher.rb', line 5

def publish(event, payload, **options)
  payload.merge!(sender: Mumukit::Nuntius.config.app_name).merge!(options)
  Mumukit::Nuntius::Publisher.publish "events", {data: payload}, {type: event}
end