Class: OpenActive::Validators::NullValidator

Inherits:
BaseValidator show all
Defined in:
lib/openactive/validators/null_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/null_validator.rb', line 8

def run(value)
  value.nil?
end