Sha256: 35b7285992c048d761ca4a6f991977837fbb0bef67794ae62cb656d5529d2de0

Contents?: true

Size: 315 Bytes

Versions: 1

Compression:

Stored size: 315 Bytes

Contents

module ObjectValidator
  module Validate
    def valid?
      validator.valid?
    end

    def errors
      return Errors.new unless defined?(@validator)
      validator.errors
    end

    private

    def validator
      @validator ||= Object.const_get("#{self.class.name}Validator").new(self)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
object_validator-0.1.1 lib/object_validator/validate.rb