Class | Regexp |
In: |
lib/facets/core-uncommon/facets/regexp/op_or.rb
|
Parent: | Object |
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