call method

  1. @override
bool call(
  1. Object? object, {
  2. C? cell,
  3. dynamic arguments,
  4. bool exception(
    1. TestRule<dynamic, Cell> rule,
    2. Exception e
    ) = TestRuleTrue.passed,
})

Validates a potential signal object against this rule.

Overrides the base implementation to provide signal-specific validation:

  1. Type checks that the object is a Signal
  2. Delegates to the concrete validation function
  3. 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 validation
  • exception: Exception handler callback (defaults to passing all exceptions)

Returns:

  • true if the object is a valid signal and passes validation
  • false if validation fails

Throws:

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);
  }
}