Mustermann::Pattern#|

Parsed documentation:
View on GitHub
@overload |(other)
  Creates a pattern that matches any string matching either one of the patterns.
  If a string is supplied, it is treated as an identity pattern.

  @example
    pattern = Mustermann.new('/foo/:name') | Mustermann.new('/:first/:second')
    pattern === '/foo/bar' # => true
    pattern === '/fox/bar' # => true
    pattern === '/foo'     # => false

@overload &(other)
  Creates a pattern that matches any string matching both of the patterns.
  If a string is supplied, it is treated as an identity pattern.

  @example
    pattern = Mustermann.new('/foo/:name') & Mustermann.new('/:first/:second')
    pattern === '/foo/bar' # => true
    pattern === '/fox/bar' # => false
    pattern === '/foo'     # => false

@overload ^(other)
  Creates a pattern that matches any string matching exactly one of the patterns.
  If a string is supplied, it is treated as an identity pattern.

  @example
    pattern = Mustermann.new('/foo/:name') ^ Mustermann.new('/:first/:second')
    pattern === '/foo/bar' # => false
    pattern === '/fox/bar' # => true
    pattern === '/foo'     # => false

@param [Mustermann::Pattern, String] other the other pattern
@return [Mustermann::Pattern] a composite pattern
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.