Sha256: 5c81a22e1a28dbbc0aaa866509b3242380975d528bdacfad9c2e2fd46d25d710

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

# frozen_string_literal: true

require 'dry/schema/config'
require 'dry/validation/macros'

module Dry
  module Validation
    # Configuration for contracts
    #
    # @see Contract#config
    #
    # @api public
    class Config < Schema::Config
      setting :macros, Macros::Container.new, &:dup

      # @api private
      def dup
        config = super
        config.macros = macros.dup
        config
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dry-validation-1.4.2 lib/dry/validation/config.rb
dry-validation-1.4.1 lib/dry/validation/config.rb
dry-validation-1.4.0 lib/dry/validation/config.rb
dry-validation-1.3.1 lib/dry/validation/config.rb
dry-validation-1.3.0 lib/dry/validation/config.rb
dry-validation-1.2.1 lib/dry/validation/config.rb
dry-validation-1.2.0 lib/dry/validation/config.rb
dry-validation-1.1.1 lib/dry/validation/config.rb
dry-validation-1.1.0 lib/dry/validation/config.rb
dry-validation-1.0.0 lib/dry/validation/config.rb