Class: Masks::Event
- Inherits:
-
Object
- Object
- Masks::Event
- Defined in:
- app/models/masks/event.rb
Overview
Publishes events using ActiveSupport::Notifications
Class Method Summary collapse
Class Method Details
.emit(name, **opts, &block) ⇒ Object
7 8 9 10 11 |
# File 'app/models/masks/event.rb', line 7 def emit(name, **opts, &block) ActiveSupport::Notifications.instrument("masks.#{name}", **opts) do block.call end end |