Class: Rrrex::StringMatch

Inherits:
Match
  • Object
show all
Includes:
SingleAtomMatch
Defined in:
lib/rrrex/string_match.rb

Direct Known Subclasses

UnescapedStringMatch

Instance Attribute Summary

Attributes included from SingleAtomMatch

#atom

Instance Method Summary collapse

Methods included from SingleAtomMatch

#group_names

Methods inherited from Match

#+, convert, #group_names, #match, #not, #or, #wrap

Constructor Details

#initialize(a) ⇒ StringMatch

Returns a new instance of StringMatch.



6
7
8
# File 'lib/rrrex/string_match.rb', line 6

def initialize( a )
  @atom = a
end

Instance Method Details

#to_regexp_stringObject



10
11
12
# File 'lib/rrrex/string_match.rb', line 10

def to_regexp_string
  wrap Regexp.escape atom
end