Sha256: 3740b59f23abc1002808acc13a4faf8277b16400f525e8b54a7e39c4c9ca1888

Contents?: true

Size: 468 Bytes

Versions: 6

Compression:

Stored size: 468 Bytes

Contents

# frozen_string_literal: true

module Dry
  module Schema
    # A registry with predicate objects from `Dry::Logic::Predicates`
    #
    # @api private
    class PredicateRegistry < Dry::Types::PredicateRegistry
      # @api private
      def arg_list(name, *values)
        predicate = self[name]

        predicate
          .parameters
          .map(&:last)
          .zip(values + Array.new(predicate.arity - values.size, Undefined))
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dry-schema-1.12.0 lib/dry/schema/predicate_registry.rb
dry-schema-1.11.3 lib/dry/schema/predicate_registry.rb
dry-schema-1.11.2 lib/dry/schema/predicate_registry.rb
dry-schema-1.11.1 lib/dry/schema/predicate_registry.rb
dry-schema-1.11.0 lib/dry/schema/predicate_registry.rb
dry-schema-1.10.3 lib/dry/schema/predicate_registry.rb