class EventHandler::AddHandlerEvent
- EventHandler::AddHandlerEvent
- EventHandler::Event
- Reference
- Object
Overview
Meta event, emitted whenever a handler is added for any event, including itself.
When AddHandlerEvent
and RemoveHandlerEvent
are emitted, they invoke
their handlers with the Wrapper
object. A wrapper object for each
handler is implicitly created on every on()
, and in addition to providing
access to the handlers themselves, wrappers also contain the values of
arguments used during handler subscription (values of once?, async?,
and at). This allows listeners on these meta events full insight into
the added handlers and their settings.
Defined in:
Constructors
Instance Method Summary
- #clone
- #copy_with(event _event = @event, wrapper _wrapper = @wrapper)
- #event : ::EventHandler::Event.class
- #wrapper : EventHandler::Wrapper(Proc(Event, Nil))
Constructor Detail
def self.new(event : ::EventHandler::Event.class, wrapper : EventHandler::Wrapper(Proc(Event, Nil)))
#