abstract class EventHandler

Direct Known Subclasses

Defined in:

aspis/handlers.cr

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(target : EventTarget) #

[View source]

Class Method Detail

def self.on(target) #

Attaches an instance of this event handler to target.


[View source]

Macro Detail

macro send?(name, *args, **kwargs) #

Invokes a method with the given name (a symbol literal) on target, passing it positional args and keyword arguments kwargs. Noop if the method does not exist.

Use with caution: use this only inside instance-side methods of a handler subclass!


[View source]
macro set(name, value) #

Sets name to value in event target.


[View source]

Instance Method Detail

def handle(event) #

Handles or ignores event.


[View source]