Class: OpenActive::Validators::ArrayValidator

Inherits:
BaseValidator show all
Defined in:
lib/openactive/validators/array_validator.rb

Instance Method Summary collapse

Methods inherited from BaseValidator

#coerce, get_validator

Instance Method Details

#run(value) ⇒ Boolean

Run validation on the given value.

Parameters:

  • value (mixed)

    The value to validate.

Returns:

  • (Boolean)

    Whether validation passes or not.



8
9
10
# File 'lib/openactive/validators/array_validator.rb', line 8

def run(value)
  value.is_a?(Array)
end