Class: MicroValidator::Errors
- Inherits:
-
Object
- Object
- MicroValidator::Errors
- Defined in:
- lib/micro_validator/errors.rb
Instance Method Summary collapse
Instance Method Details
#add(attribute, message) ⇒ Object
3 4 5 6 |
# File 'lib/micro_validator/errors.rb', line 3 def add(attribute, ) errors[attribute] ||= [] errors[attribute] << end |
#clear ⇒ Object
8 9 10 |
# File 'lib/micro_validator/errors.rb', line 8 def clear @errors = {} end |
#empty? ⇒ Boolean
12 13 14 |
# File 'lib/micro_validator/errors.rb', line 12 def empty? errors.empty? end |