class Dry::Schema::Message::Or::MultiPath
def hint?
- Api: - private
def hint? false end
def initialize(*args)
- Api: - private
def initialize(*args) super @root = [left, right].flatten.map(&:_path).reduce(:&) @left = left.map { |msg| msg.to_or(root) } @right = right.map { |msg| msg.to_or(root) } end
def to_h
- Api: - public
def to_h @to_h ||= Path[[*root, :or]].to_h( [left.map(&:to_h).reduce(:merge), right.map(&:to_h).reduce(:merge)] ) end