Class: WebhookSystem::Dispatcher
- Inherits:
-
Object
- Object
- WebhookSystem::Dispatcher
- Defined in:
- lib/webhook_system/dispatcher.rb
Overview
Main code that handles dispatching of events out to subscribers
Class Method Summary collapse
Class Method Details
.dispatch(event) ⇒ Object
8 9 10 11 12 |
# File 'lib/webhook_system/dispatcher.rb', line 8 def dispatch(event) WebhookSystem::Subscription.interested_in_topic(event.event_name).each do |subscription| WebhookSystem::Job.perform_later subscription, event.as_json end end |