Class: Ripper::TokenPattern::MatchData
- Inherits:
-
Object
- Object
- Ripper::TokenPattern::MatchData
- Defined in:
- lib/ripper/lexer.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(tokens, match) ⇒ MatchData
constructor
A new instance of MatchData.
- #string(n = 0) ⇒ Object
Constructor Details
#initialize(tokens, match) ⇒ MatchData
Returns a new instance of MatchData.
306 307 308 309 |
# File 'lib/ripper/lexer.rb', line 306 def initialize(tokens, match) @tokens = tokens @match = match end |
Instance Method Details
#string(n = 0) ⇒ Object
311 312 313 314 |
# File 'lib/ripper/lexer.rb', line 311 def string(n = 0) return nil unless @match match(n).join end |