module ActiveUtils::Validateable
def attributes=(attributes)
def attributes=(attributes) unless attributes.nil? for key, value in attributes send("#{key}=", value ) end end end
def errors
def errors @errors ||= Errors.new(self) end
def initialize(attributes = {})
def initialize(attributes = {}) self.attributes = attributes end
def valid?
:nodoc:
def valid? errors.clear before_validate if respond_to?(:before_validate, true) validate if respond_to?(:validate, true) errors.empty? end