call method
Validates the given action against this rule.
Automatically returns false if:
- The host is unmodifiable and the action is in its modifiable set
Throws ArgumentError if:
Parameters:
Implementation
@override
bool call(Object? object, {C? cell, arguments, bool Function(TestRule rule, Exception e) exception = TestRuleTrue.passed}) {
try {
if (object is! Function) {
throw ArgumentError.value(object, 'object', 'object not Function');
} else if (cell == null) {
throw ArgumentError.value(cell, 'host', 'host is null');
} else if (arguments is! Arguments) {
throw ArgumentError.value(arguments, 'arguments', 'arguments is not Arguments type');
}
return action(object, cell, arguments: arguments);
} on Exception catch(e) {
return exception(this, e);
}
}