Class: Lexr::MatchData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(characters_matched, token) ⇒ MatchData

Returns a new instance of MatchData.



150
151
152
153
# File 'lib/lexr.rb', line 150

def initialize(characters_matched, token)
  @characters_matched = characters_matched
  @token = token
end

Instance Attribute Details

#characters_matchedObject (readonly)

Returns the value of attribute characters_matched.



148
149
150
# File 'lib/lexr.rb', line 148

def characters_matched
  @characters_matched
end

#tokenObject (readonly)

Returns the value of attribute token.



148
149
150
# File 'lib/lexr.rb', line 148

def token
  @token
end