module HTTP2::EventBus

Overview

When included, this equips the class with a basic event bus.

Defined in:

event_bus.cr

Instance Method Summary

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


[View source]
def listen(event : Symbol, _ -> Proc(Nil)) #

[View source]
def listeners(event) #

[View source]
def once(event, &block) #

Subscribe to next event (at most once) for specified type.

@param event [Symbol] @param block [Proc] callback function


[View source]