Class: Ripper::TokenPattern::MatchData
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/ripper/lib/ripper/lexer.rb |
Class Method Summary
- .new(tokens, match) ⇒ MatchData constructor
Instance Method Summary
- #string(n = 0)
- #match(n = 0) private
Constructor Details
.new(tokens, match) ⇒ MatchData
Instance Method Details
#match(n = 0) (private)
[ GitHub ]# File 'ext/ripper/lib/ripper/lexer.rb', line 295
def match(n = 0) return [] unless @match @tokens[@match.begin(n)...@match.end(n)].map {|pos,type,str| str } end
#string(n = 0)
[ GitHub ]# File 'ext/ripper/lib/ripper/lexer.rb', line 288
def string(n = 0) return nil unless @match match(n).join end