class Dry::Types::PredicateRegistry

A registry with predicate objects from ‘Dry::Logic::Predicates`

@api private

Constants

KERNEL_RESPOND_TO

Attributes

has_predicate[R]

@api private

predicates[R]

@api private

Public Class Methods

new(predicates = Logic::Predicates) click to toggle source

@api private

# File lib/dry/types/predicate_registry.rb, line 19
def initialize(predicates = Logic::Predicates)
  @predicates = predicates
end

Public Instance Methods

[](name) click to toggle source

@api private

# File lib/dry/types/predicate_registry.rb, line 29
def [](name)
  predicates[name]
end
key?(name) click to toggle source

@api private

# File lib/dry/types/predicate_registry.rb, line 24
def key?(name)
  KERNEL_RESPOND_TO.bind_call(@predicates, name)
end