Class: Medi8::Jobs::NotificationJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- Medi8::Jobs::NotificationJob
- Defined in:
- lib/medi8/jobs/notification_job.rb
Overview
NotificationJob is an ActiveJob that processes notifications.
Instance Method Summary collapse
-
#perform(handler_class_name, event_hash, event_class_name) ⇒ Object
Perform the job with the given handler class name, event hash, and event class name.
Instance Method Details
#perform(handler_class_name, event_hash, event_class_name) ⇒ Object
Perform the job with the given handler class name, event hash, and event class name.
11 12 13 14 15 |
# File 'lib/medi8/jobs/notification_job.rb', line 11 def perform(handler_class_name, event_hash, event_class_name) handler = handler_class_name.constantize.new event = event_class_name.constantize.new(**event_hash.symbolize_keys) handler.call(event) end |