Class: Dallal::Events::EventSubscriber
- Inherits:
-
Object
- Object
- Dallal::Events::EventSubscriber
- Includes:
- Subscriber
- Defined in:
- lib/dallal/events/event_subscriber.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(payload) ⇒ EventSubscriber
constructor
A new instance of EventSubscriber.
Constructor Details
#initialize(payload) ⇒ EventSubscriber
Returns a new instance of EventSubscriber.
11 12 13 |
# File 'lib/dallal/events/event_subscriber.rb', line 11 def initialize(payload) @payload = payload end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 |
# File 'lib/dallal/events/event_subscriber.rb', line 15 def execute if should_create_notifications? DallalJob.perform_later payload[:class], payload[:id], payload[:event].to_s end end |