add Rule
Adds a rule to this collection. The given rule is invoked when an unknown object is requested by name.
Return
The added rule.
Parameters
rule
The rule to add.
Adds a rule to this collection. The given closure is executed when an unknown object is requested by name. The requested name is passed to the closure as a parameter.
Return
The added rule.
Parameters
description
The description of the rule.
rule Action
The closure to execute to apply the rule.
Adds a rule to this collection. The given action is executed when an unknown object is requested by name. The requested name is passed to the action.
Return
The added rule.
Since
3.3
Parameters
description
The description of the rule.
rule Action
The action to execute to apply the rule.