Module: ROM::Notifications::Listener
- Included in:
- Gateway, Plugins::Relation::Changeset, Relation::ClassInterface, Schema
- Defined in:
- core/lib/rom/support/notifications.rb
Overview
Extension for objects that can listen to events
Instance Method Summary collapse
-
#subscribe(event_id, query = EMPTY_HASH, &block) ⇒ Object
Subscribe to events.
Instance Method Details
#subscribe(event_id, query = EMPTY_HASH, &block) ⇒ Object
Subscribe to events
195 196 197 |
# File 'core/lib/rom/support/notifications.rb', line 195 def subscribe(event_id, query = EMPTY_HASH, &block) Notifications.listeners[event_id] << [block, query] end |