Module: Synapse::EventBus::MappingEventListener
- Extended by:
- ActiveSupport::Concern
- Includes:
- EventListener
- Defined in:
- lib/synapse/event_bus/mapping.rb
Overview
Mixin for an event listener that wishes to use the mapping DSL
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#notify(event) ⇒ undefined
42 43 44 45 46 47 |
# File 'lib/synapse/event_bus/mapping.rb', line 42 def notify(event) mapping = event_mapper.mapping_for event.payload_type if mapping mapping.invoke self, event.payload, event end end |