Class: NRB::BeerXML::RecordValidators::BooleanValidator
- Inherits:
-
ActiveModel::Validations::InclusionValidator
- Object
- ActiveModel::Validations::InclusionValidator
- NRB::BeerXML::RecordValidators::BooleanValidator
- Defined in:
- lib/nrb/beerxml/record_validators/boolean_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
5 6 7 8 9 |
# File 'lib/nrb/beerxml/record_validators/boolean_validator.rb', line 5 def validate_each(record, attribute, value) unless include?(record, value) record.errors[attribute] << "must be false or true" end end |