Module: EventRouter::Helpers::Event
- Included in:
- DeliveryAdapters::Helpers::Sidekiq
- Defined in:
- lib/event_router/helpers/event.rb
Class Method Summary collapse
- .destination_options(destination, adapter) ⇒ Object
- .event_options(event, adapter) ⇒ Object
- .yield_destinations(event) ⇒ Object
Class Method Details
.destination_options(destination, adapter) ⇒ Object
25 26 27 |
# File 'lib/event_router/helpers/event.rb', line 25 def (destination, adapter) adapter..merge(destination.) end |
.event_options(event, adapter) ⇒ Object
19 20 21 22 23 |
# File 'lib/event_router/helpers/event.rb', line 19 def (event, adapter) return adapter. unless event. adapter..merge(event.) end |
.yield_destinations(event) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/event_router/helpers/event.rb', line 8 def yield_destinations(event) event.destinations.each do |_name, destination| if destination.prefetch_payload? payload = destination.extra_payload(event) serialized_payload = EventRouter.serialize(payload) end yield destination, serialized_payload if block_given? end end |