class Rosegold::EventEmitter
- Rosegold::EventEmitter
- Reference
- Object
Direct Known Subclasses
Defined in:
rosegold/models/event_emitter.crInstance Method Summary
- #emit_event(event : Event)
- #event_handlers : Handlers
- #off(event_type : T.class, id : UUID) forall T
- #on(event_type : T.class, id : UUID = UUID.random, &block : T -> ) forall T
- #once(event_type : T.class, &block : T -> ) forall T
-
#wait_for(event_type : T.class, timeout : Time::Span | Nil = nil) forall T
Waits for an event, if timeout is given, it will return nil if the timeout is reached before the event is emitted.
Instance Method Detail
Waits for an event, if timeout is given, it will return nil if the timeout is reached before the event is emitted.