mixins/signalable

Description

Make an object capable of handling a signal. Or many signals.

Details

Members


autoLoadSignals :boolean

Description

When true, the class will load the signals hash and create the signal definitions during construction

Details
boolean

signals :hash|function

Description

A hash of signals to create automatically. Each definition consists of a name for the signal as the key
and then a hash of options (nullable) for each signal

Details
hash | function

Methods


refreshSignals()

Description

When you make a change to the signals hash after loading, then you can make it reload


<private> _loadSignals()

Description

Interprets the signals hash and instantiates it


<private> _addSignal( name, options )

Description

Creates a single signal

Parameters
Name Type Description
name string

The name of the signal

options module:mixins/signalable~SignalOptions

The options the signal expects


<private> _addSignals( signals )

Description

Add a signal to an object. If any members of the hash already exist in this.signals, they will be overwritten.

Parameters
Name Type Description
signals module:mixins/signalable.SignalOptions

<private> destroy()

Description

Clean up