Class: ErrorProne::Errors
- Inherits:
-
Hash
- Object
- Hash
- ErrorProne::Errors
- Defined in:
- lib/error_prone.rb
Instance Method Summary collapse
Instance Method Details
#add(field, error) ⇒ Object
213 214 215 216 |
# File 'lib/error_prone.rb', line 213 def add(field, error) self.for(field).push(error) self end |
#for(field) ⇒ Object
218 219 220 |
# File 'lib/error_prone.rb', line 218 def for(field) self[field] ||= [] end |