Sha256: d2446f8b793ca86879c4a3684b9ca68f65a22449e88599728a8402e446b9f265

Contents?: true

Size: 507 Bytes

Versions: 2

Compression:

Stored size: 507 Bytes

Contents

# encoding: utf-8

module Attestor

  module Validations

    # @private
    class Context

      attr_accessor :klass, :options

      def initialize(klass, options)
        self.klass   = klass
        self.options = options
      end

      def validate(name = nil, &block)
        klass.validate(name, options, &block)
      end

      def validates(name = nil, &block)
        klass.validates(name, options, &block)
      end

    end # class Context

  end # module Validations

end # module Attestor

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
attestor-2.2.1 lib/attestor/validations/context.rb
attestor-2.2.0 lib/attestor/validations/context.rb