Parent

Methods

Files

Regexp

Public Instance Methods

|(arg) click to toggle source

Operator form of `Regexp.union`:

/a/ | /b/  #=> /(a|b)/

NOTE: This is not (presently) a common core extension and is not loaded automatically when using require 'facets'.

# File lib/facets/core-uncommon/facets/regexp/op_or.rb, line 9
def |(arg)
  Regexp.union(self, arg.is_a?(Regexp) ? arg : arg.to_s)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.