Class: OpenActive::Validators::BoolValidator
- Inherits:
-
BaseValidator
- Object
- BaseValidator
- OpenActive::Validators::BoolValidator
- Defined in:
- lib/openactive/validators/bool_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 |
# File 'lib/openactive/validators/bool_validator.rb', line 8 def run(value) [true, false].include?(value) end |