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.



145
146
147
148
# File 'lib/lexr.rb', line 145

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.



143
144
145
# File 'lib/lexr.rb', line 143

def characters_matched
  @characters_matched
end

#tokenObject (readonly)

Returns the value of attribute token.



143
144
145
# File 'lib/lexr.rb', line 143

def token
  @token
end