class Dinamo::Model::Errors
Public Instance Methods
add(attribute, message)
click to toggle source
# File lib/dinamo/model/errors.rb, line 4 def add(attribute, message) fetch(attribute) { self[attribute] = [] } << message end
count()
click to toggle source
# File lib/dinamo/model/errors.rb, line 8 def count values.inject(0) { |all, value| all + value.length } end
empty?()
click to toggle source
# File lib/dinamo/model/errors.rb, line 12 def empty? count.zero? end