class Dry::Schema::TypesMerger
Combines multiple logical operations into a single type, taking into account the type of logical operation (or, and, implication) and the underlying types (schemas, nominals, etc.)
@api private
Attributes
type_registry[R]
Public Class Methods
new(type_registry = TypeRegistry.new)
click to toggle source
# File lib/dry/schema/types_merger.rb, line 127 def initialize(type_registry = TypeRegistry.new) @type_registry = type_registry end
Public Instance Methods
call(op_class, lhs, rhs)
click to toggle source
@api private
# File lib/dry/schema/types_merger.rb, line 132 def call(op_class, lhs, rhs) lhs.merge(rhs) do |_k, old, new| ValueMerger.new(self, op_class, old, new).call end end