Class: Veto::EqualsAttributeCheck
- Inherits:
-
AttributeCheck
- Object
- AttributeCheck
- Veto::EqualsAttributeCheck
- Includes:
- AgainstAttributeCco
- Defined in:
- lib/veto_checks.rb
Constant Summary collapse
- MSG =
"does not match %s"
Constants included from AgainstAttributeCco
AgainstAttributeCco::MSG_MISSING_ATTR
Instance Method Summary collapse
Methods included from AgainstAttributeCco
Instance Method Details
#check(attribute, value, against, errors, options = {}) ⇒ Object
57 58 59 60 |
# File 'lib/veto_checks.rb', line 57 def check(attribute, value, against, errors, ={}) errors.add(.fetch(:on, attribute), ([:message] || MSG) % [:attribute] ) unless value == against end |