abstract fun addRule(rule: Rule): Rule
Adds a rule to this collection. The given rule is invoked when an unknown object is requested by name.
Return
The added rule.
abstract fun addRule(description: String, ruleAction: Closure<Any>): Rule
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.
description
- The description of the rule.
ruleAction
- The closure to execute to apply the rule.
Return
The added rule.
abstract fun addRule(description: String, ruleAction: Action<String>): 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.
description
- The description of the rule.
ruleAction
- The action to execute to apply the rule.
Return
The added rule.
Since
3.3