Sha256: e955ab8918c55b7b2384b21734d3fc8a166bdd7a84c7b44210abf778176fd0b4
Contents?: true
Size: 234 Bytes
Versions: 3
Compression:
Stored size: 234 Bytes
Contents
module Validatable class Errors < Hash def initialize super([]) end def add attribute, message self[attribute] = [] unless self.include? attribute self[attribute].push *Array(message) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
validatable2-0.0.12 | lib/validatable/errors.rb |
validatable2-0.0.11 | lib/validatable/errors.rb |
validatable2-0.0.10 | lib/validatable/errors.rb |