Class: Dry::Schema::PredicateInferrer Private
- Inherits:
-
Types::PredicateInferrer
- Object
- Types::PredicateInferrer
- Dry::Schema::PredicateInferrer
- Defined in:
- lib/dry/schema/predicate_inferrer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- Compiler =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
::Class.new(superclass::Compiler) do # @api private def visit_intersection(node) left_node, right_node, = node left = visit(left_node) right = visit(right_node) [left, right].flatten.compact end end
Instance Method Summary collapse
-
#initialize(registry = PredicateRegistry.new) ⇒ PredicateInferrer
constructor
private
A new instance of PredicateInferrer.
Constructor Details
#initialize(registry = PredicateRegistry.new) ⇒ PredicateInferrer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PredicateInferrer.
18 19 20 21 22 |
# File 'lib/dry/schema/predicate_inferrer.rb', line 18 def initialize(registry = PredicateRegistry.new) super @compiler = Compiler.new(registry) end |