Instance Method

evaluatePredicateWithSystem:

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

Declaration

- (BOOL)evaluatePredicateWithSystem:(GKRuleSystem *)system;

Parameters

sys

The rule system against which to evaluate the rule.

Return Value

YES if the rule is satisfied (and its action should be executed); otherwise, NO.

Discussion

A rule system calls this method when evaluating its rules.

If the rule was created with the ruleWithPredicate:assertingFact:grade: or ruleWithPredicate:retractingFact:grade:, calling this method returns the result of testing the predicate against the provided rule system. If the rule was created with the ruleWithBlockPredicate:action: method, calling this method calls the predicate block and returns the result. Otherwise, this method always returns NO—subclasses should override this method to implement their own predicate tests.

See Also

Evaluating a Rule

- performActionWithSystem:

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