Class: Ripper::TokenPattern::MatchData

Inherits:
Object
  • Object
show all
Defined in:
lib/ripper/lexer.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(tokens, match) ⇒ MatchData


166
167
168
169
# File 'lib/ripper/lexer.rb', line 166

def initialize(tokens, match)
  @tokens = tokens
  @match = match
end

Instance Method Details

#string(n = 0) ⇒ Object


171
172
173
174
# File 'lib/ripper/lexer.rb', line 171

def string(n = 0)
  return nil unless @match
  match(n).join
end