Module: ROM::Notifications::Listener
- Included in:
- Command::Restrictable, Gateway, Relation, Relation::ClassInterface
- Defined in:
- 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
199 200 201 |
# File 'lib/rom/support/notifications.rb', line 199 def subscribe(event_id, query = EMPTY_HASH, &block) Notifications.listeners[self] << [event_id, block, query] end |