call method
Validates a potential signal object against this rule.
Overrides the base implementation to provide signal-specific validation:
- Type checks that the object is a Signal
- Delegates to the concrete validation function
- Handles any validation errors
Parameters:
object
: The object to validate (must be a Signal)cell
: The cell context for validation (optional)arguments
: Not used in signal validationexception
: Exception handler callback (defaults to passing all exceptions)
Returns:
true
if the object is a valid signal and passes validationfalse
if validation fails
Throws:
- ArgumentError if the object is not a Signal
Implementation
@override
bool call(Object? object, {C? cell, arguments, bool Function(TestRule rule, Exception e) exception = TestRuleTrue.passed}) {
try {
if (object is! Signal) {
throw ArgumentError.value(object, 'object', 'object not Signal');
}
return signal(object, cell: cell);
} on Exception catch(e) {
return exception(this, e);
}
}