InterfaceBehavior

InterfaceBehavior

Whereas Behaviors describe an abstract sequence of things that are expected to happen an InterfaceBehavior describes the concrete actions that an Interface is expected to take. The primary inteface to this class is through the Module's defineBehavior method.

Constructor

new InterfaceBehavior()

Source:

Methods

args(…args) → {InterfaceBehavior}

Source:

The arguments to be sent to the interface, as specified by args

Parameters:
Name Type Attributes Description
args any <repeatable>

The arguments to be passed to the interface

Returns:

This interface, for chaining

Type
InterfaceBehavior

context(ctx) → {InterfaceBehavior}

Source:

The context (this value) to be passed to the interface. Only applicable to method / function interfaces.

Parameters:
Name Type Description
ctx any

The value to set the context of the function to

Returns:

This interface, for chaining

Type
InterfaceBehavior

returns(retVal) → {InterfaceBehavior}

Source:

The interface returns the value specified by retVal

Parameters:
Name Type Description
retVal any

The value to be returned by the interface

Returns:

This interface, for chaining

Type
InterfaceBehavior

set(val) → {InterfaceBehavior}

Source:

The value to be set on the property, as specified by val

Parameters:
Name Type Description
val any

The value to set for the property

Returns:

This interface, for chaining

Type
InterfaceBehavior

throws(err) → {InterfaceBehavior}

Source:

The interface throws the Error specified by err

Parameters:
Name Type Description
err Error

The error to be thrown

Returns:

This interface, for chaining

Type
InterfaceBehavior