Class: Ripper::TokenPattern::MatchData
- Defined in:
- lib/langscan/ruby/compat/ripper/lexer.rb
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.
159 160 161 162 |
# File 'lib/langscan/ruby/compat/ripper/lexer.rb', line 159 def initialize(tokens, match) @tokens = tokens @match = match end |
Instance Method Details
#string(n = 0) ⇒ Object
164 165 166 167 |
# File 'lib/langscan/ruby/compat/ripper/lexer.rb', line 164 def string(n = 0) return nil unless @match match(n).join end |