Class: Ripper::TokenPattern
- Inherits:
-
Object
- Object
- Ripper::TokenPattern
- Defined in:
- lib/ripper/lexer.rb
Overview
:nodoc:
Defined Under Namespace
Classes: CompileError, Error, MatchData, MatchError
Instance Method Summary collapse
-
#initialize(pattern) ⇒ TokenPattern
constructor
A new instance of TokenPattern.
- #match(str) ⇒ Object
- #match_list(tokens) ⇒ Object
Constructor Details
#initialize(pattern) ⇒ TokenPattern
Returns a new instance of TokenPattern.
247 248 249 250 |
# File 'lib/ripper/lexer.rb', line 247 def initialize(pattern) @source = pattern @re = compile(pattern) end |