class WageSlave::ValidationErrors

Attributes

all[RW]

Public Class Methods

new() click to toggle source
# File lib/wage_slave/validation.rb, line 23
def initialize
  @all = {}
end

Public Instance Methods

add(name, msg) click to toggle source
# File lib/wage_slave/validation.rb, line 27
def add(name, msg)
  (@all[name] ||= []) << msg
end
full_messages() click to toggle source
# File lib/wage_slave/validation.rb, line 31
def full_messages
  @all.map do |e|
    "#{e.first.capitalize} #{e.last.join(' & ')}. "
  end.join
end