Sha256: c186cb7ef05ba209ffcfd86054448a59038b0a6671ef97f7a0ae1fee84f8079c

Contents?: true

Size: 260 Bytes

Versions: 6

Compression:

Stored size: 260 Bytes

Contents

class Regexp

  # Add regular expressions.
  #
  #   /a/ | /b/ == /(?-mix:a)(?-mix:b)/
  #
  # Functionally equivalent to:
  #
  #   /ab/
  #
  # CREDIT:
  def |(other)
    other = Regexp.escape(other) if other.is_a?(String)
    /#{self}|#{other}/
  end

end

Version data entries

6 entries across 5 versions & 1 rubygems

Version Path
facets-2.9.2 lib/core/facets/regexp/op_or.rb
facets-2.9.2 src/core/facets/regexp/op_or.rb
facets-2.9.1 lib/core/facets/regexp/op_or.rb
facets-2.9.0 lib/core/facets/regexp/op_or.rb
facets-2.9.0.pre.2 lib/core/facets/regexp/op_or.rb
facets-2.9.0.pre.1 lib/core/facets/regexp/op_or.rb