class

Quartz::Hooks::Notifier

Inherits Reference / Object

The Notifier provides a mechanism for broadcasting hooks during a simulation.

Hooks can be dispatched either to Procs or to Notifiable objects. They can register to a hook using the #subscribe method. Each invocation of this method registers the receiver to a given hook. Therefore, objects may register to several hooks.

A default Notifier instance is associated with Simulation instances so that objects can subscribe to simulation events.

Instance methods

clear(hook : Symbol)

Removes all entries that previously registered to the specified hook from the notifier.

Source
clear

Removes all entries from the notifier.

Source
count_listeners(hook : Symbol)

Returns the number of objects listening for the specified hook.

Source
count_listeners

Returns the total number of objects listening to hooks.

Source
notify(hook : Symbol)

Publish a given hook, so that each registered object in the receiver is notified.

Source
subscribe(hook : Symbol, notifiable : Notifiable)

Register the given notifiable to the specified hook.

Source
subscribe(hook : Symbol, &block : Symbol -> )

Register the given block to the specified hook.

Source
unsubscribe(hook : Symbol, instance : Symbol -> | Notifiable)

Unsubscribes the specified entry from listening to the specified hook.

Source