Sha256: 80bd6fd4a149411fb9dfee8845b8d3244d1c0a7e0c795a9370c19687c44590a0
Contents?: true
Size: 357 Bytes
Versions: 1
Compression:
Stored size: 357 Bytes
Contents
module SimpleCommand class NotImplementedError < ::StandardError; end class Errors < Hash def add_error(key, value) self[key] ||= [] self[key] << value self[key].uniq! end def add_errors(errors_hash) errors_hash.each do |key, values| values.each { |value| add_error key, value } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_command-0.0.6 | lib/simple_command/errors.rb |