Sha256: 2fbd545b6c5e6542684551bcddca0e8111dd02ac58aa9c097d6b3039434faf3a
Contents?: true
Size: 671 Bytes
Versions: 10
Compression:
Stored size: 671 Bytes
Contents
# frozen_string_literal: true module Dry module Schema # Message objects used by message sets # # @api public class Message module Or # @api private def self.[](left, right, messages) msgs = [left, right].flatten paths = msgs.map(&:path) if paths.uniq.size == 1 SinglePath.new(left, right, messages) elsif MultiPath.handler(right) if MultiPath.handler(left) && paths.uniq.size > 1 MultiPath.new(left, right) else right end else msgs.max end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems