module HTTP2::EventBus
Overview
When included, this equips the class with a basic event bus.
Defined in:
event_bus.crInstance Method Summary
-
#emit(event, *args, &block)
Emit event with provided arguments.
- #listen(event : Symbol, _ -> Proc(Nil))
- #listeners(event)
-
#once(event, &block)
Subscribe to next event (at most once) for specified type.
Instance Method Detail
def emit(event, *args, &block)
#
Emit event with provided arguments.
@param event [Symbol] @param args [Array] arguments to be passed to the callbacks @param block [Proc] callback function
def once(event, &block)
#
Subscribe to next event (at most once) for specified type.
@param event [Symbol] @param block [Proc] callback function