Class: OpenActive::Validators::BaseModelValidator
- Inherits:
-
BaseValidator
- Object
- BaseValidator
- OpenActive::Validators::BaseModelValidator
- Defined in:
- lib/openactive/validators/base_model_validator.rb
Instance Method Summary collapse
-
#run(value) ⇒ Boolean
Run validation on the given value.
Methods inherited from BaseValidator
Instance Method Details
#run(value) ⇒ Boolean
Run validation on the given value.
8 9 10 11 12 13 14 |
# File 'lib/openactive/validators/base_model_validator.rb', line 8 def run(value) # With BaseModelValidator we are a bit more relaxed # in terms of checking the class name. # We allow the class to be an instanceof BaseModel # Or to be a sub class (BaseModel is one of its parent) value.is_a?(OpenActive::JsonLdModel) end |