Sha256: 077b88c9d7837bc16001a1f90033edd603d791ee065b1a3c3c922523a51506d2
Contents?: true
Size: 498 Bytes
Versions: 128
Compression:
Stored size: 498 Bytes
Contents
module Tickethub class Errors def initialize(errors) @errors = errors || {} end def full_messages_for(attribute) send attribute end def on(attribute) @errors[attribute.to_s] end def valid?(attribute) send(attribute).empty? end def invalid?(attribute) send(attribute).any? end def [](key) send key end protected def method_missing(method, *arguments) on(method) || [] end end end
Version data entries
128 entries across 128 versions & 1 rubygems