Module: Arrow::RegexpOperators
- Included in:
- Regexp
- Defined in:
- lib/arrow/monkeypatches.rb
Overview
Add some operator methods to regular expression objects for catenation, union, etc.
Instance Method Summary collapse
-
#+(other) ⇒ Object
Append the given
other
Regexp (or String) onto a copy of the receiving one and return it. -
#|(other) ⇒ Object
Create and return a new Regexp that is an alternation between the receiver and the
other
Regexp.
Instance Method Details
#+(other) ⇒ Object
Append the given other
Regexp (or String) onto a copy of the receiving one and return it.
23 24 25 |
# File 'lib/arrow/monkeypatches.rb', line 23 def +( other ) return self.class.new( self.to_s + other.to_s ) end |