Sha256: 7ffc3fedd5cbca3d05e8019f8dc8f5396a282565ded59067e573c9e32248795b

Contents?: true

Size: 851 Bytes

Versions: 25

Compression:

Stored size: 851 Bytes

Contents

require 'dry/validation/input_processor_compiler'

module Dry
  module Validation
    class Schema
      def self.input_processor
        @input_processor ||=
          begin
            if type_map.is_a?(Dry::Types::Safe) && config.input_processor != :noop
              type_map
            elsif type_map.size > 0 && config.input_processor != :noop
              build_hash_type(type_map)
            elsif input_processor_compiler
              input_processor_compiler.(rule_ast)
            else
              NOOP_INPUT_PROCESSOR
            end
          end
      end

      def self.input_processor_ast(type)
        config.input_processor_map.fetch(type).schema_ast(rule_ast)
      end

      def self.input_processor_compiler
        @input_processor_comp ||= config.input_processor_map[config.input_processor]
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
dry-validation-0.13.3 lib/dry/validation/schema/deprecated.rb
dry-validation-0.13.2 lib/dry/validation/schema/deprecated.rb
dry-validation-0.13.1 lib/dry/validation/schema/deprecated.rb
dry-validation-0.11.2 lib/dry/validation/schema/deprecated.rb
dry-validation-0.12.3 lib/dry/validation/schema/deprecated.rb
dry-validation-0.13.0 lib/dry/validation/schema/deprecated.rb
dry-validation-0.12.2 lib/dry/validation/schema/deprecated.rb
dry-validation-0.12.1 lib/dry/validation/schema/deprecated.rb
dry-validation-0.12.0 lib/dry/validation/schema/deprecated.rb
dry-validation-0.11.1 lib/dry/validation/schema/deprecated.rb
dry-validation-0.11.0 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.7 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.6 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.5 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.4 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.3 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.2 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.1 lib/dry/validation/schema/deprecated.rb
dry-validation-0.10.0 lib/dry/validation/schema/deprecated.rb
dry-validation-0.9.5 lib/dry/validation/schema/deprecated.rb