Instance Method

performActionWithSystem:

Performs actions that should result when the rule is satisfied in the context of the specified rule system.

Declaration

- (void)performActionWithSystem:(GKRuleSystem *)system;

Parameters

sys

The rule system against which to evaluate the rule.

Discussion

A rule system calls this method when evaluating its rules, if and only if the rule’s predicate has been satisfied (that is, the evaluatePredicateWithSystem: method has returned YES), and after moving the rule from its agenda list to its executed list.

If the rule was created with the ruleWithPredicate:assertingFact:grade: or ruleWithPredicate:retractingFact:grade:, calling this method asserts or retracts the fact as specified in the provided rule system. If the rule was created with the ruleWithBlockPredicate:action: method, calling this method calls the action block. Otherwise, this method does nothing—subclasses should override this method to implement their own actions.

See Also

Evaluating a Rule

- evaluatePredicateWithSystem:

Returns a Boolean value indicating whether the rule has been satisfied in the context of the specified rule system.