Class: Lexr::MatchData
- Inherits:
-
Object
- Object
- Lexr::MatchData
- Defined in:
- lib/lexr.rb
Instance Attribute Summary collapse
-
#characters_matched ⇒ Object
readonly
Returns the value of attribute characters_matched.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(characters_matched, token) ⇒ MatchData
constructor
A new instance of MatchData.
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_matched ⇒ Object (readonly)
Returns the value of attribute characters_matched.
148 149 150 |
# File 'lib/lexr.rb', line 148 def characters_matched @characters_matched end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
148 149 150 |
# File 'lib/lexr.rb', line 148 def token @token end |