Class: Veto::DoesntEqualAttributeCheck
- Inherits:
-
AttributeCheck
- Object
- AttributeCheck
- Veto::DoesntEqualAttributeCheck
- Includes:
- AgainstAttributeCco
- Defined in:
- lib/veto_checks.rb
Constant Summary collapse
- MSG =
"matches %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
68 69 70 71 |
# File 'lib/veto_checks.rb', line 68 def check(attribute, value, against, errors, ={}) errors.add(.fetch(:on, attribute), ([:message] || MSG) % [:attribute] ) if value == against end |