abstract class Cute::Signal

Overview

Base class for Cute.signal

Direct Known Subclasses

Defined in:

cute/signal.cr

Instance Method Summary

Macro Summary

Instance Method Detail

def disconnect(handler_hash) #

Removes the handler with the handle handler_hash.


[View source]
def disconnect #

Removes all handlers


[View source]
def name : String | Nil #

Returns the name of the signal, if applicable.


[View source]
def wait #

Waits for the next event and returns the signal arguments. See samples/wait.cr for a usage example.


[View source]

Macro Detail

macro implementation(call, async) #

Private-ish macro writing methods as required by Signal for a sub-class of it. call is expected to be a CallNode, and async if the signal emission shall be delivered asynchronously, or right away.

Note: You usually don't use this macro yourself. See Cute.signal instead.


[View source]