class Athena::EventDispatcher::Spec::TracableEventDispatcher

Overview

Test implementation of AED::EventDispatcherInterface that keeps track of the events that were dispatched.

Defined in:

spec.cr

Constructors

Instance Method Summary

Instance methods inherited from class Athena::EventDispatcher::EventDispatcher

add_listener(event : AED::Event.class, listener : AED::EventListenerType, priority : Int32 = 0) : Nil add_listener, dispatch(event : AED::Event) : Nil dispatch, has_listeners?(event : AED::Event.class | Nil = nil) : Bool has_listeners?, listener_priority(event : AED::Event.class, listener : AED::EventListenerInterface.class) : Int32 | Nil listener_priority, listeners(event : AED::Event.class | Nil = nil) : Array(AED::EventListener) listeners, remove_listener(event : AED::Event.class, listener : AED::EventListenerInterface.class) : Nil
remove_listener(event : AED::Event.class, listener : AED::EventListenerType) : Nil
remove_listener

Constructor methods inherited from class Athena::EventDispatcher::EventDispatcher

new(listeners : Array(AED::EventListenerInterface))
new
new

Instance methods inherited from module Athena::EventDispatcher::EventDispatcherInterface

add_listener(event : AED::Event.class, listener : AED::EventListenerType, priority : Int32) : Nil add_listener, dispatch(event : AED::Event) : Nil dispatch, has_listeners?(event : AED::Event.class | Nil) : Bool has_listeners?, listener_priority(event : AED::Event.class, listener : AED::EventListenerInterface.class) : Int32 | Nil listener_priority, listeners(event : AED::Event.class | Nil) : Array(AED::EventListener) listeners, remove_listener(event : AED::Event.class, listener : AED::EventListenerInterface.class) : Nil
remove_listener(event : AED::Event.class, listener : AED::EventListenerType) : Nil
remove_listener

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def dispatch(event : AED::Event) : Nil #
Description copied from class Athena::EventDispatcher::EventDispatcher

:inherit:


[View source]
def emitted_events : Array(AED::Event.class) #

[View source]