Class: RubyToken::Token
- Inherits:
-
Object
- Object
- RubyToken::Token
- Defined in:
- lib/rdoc-f95/parsers/parse_rb.rb
Constant Summary collapse
- NO_TEXT =
"??".freeze
Instance Attribute Summary collapse
-
#char_no ⇒ Object
readonly
Returns the value of attribute char_no.
-
#line_no ⇒ Object
readonly
Returns the value of attribute line_no.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(line_no, char_no) ⇒ Token
constructor
A new instance of Token.
-
#set_text(text) ⇒ Object
Because we’re used in contexts that expect to return a token, we set the text string and then return ourselves.
Constructor Details
Instance Attribute Details
#char_no ⇒ Object (readonly)
Returns the value of attribute char_no.
56 57 58 |
# File 'lib/rdoc-f95/parsers/parse_rb.rb', line 56 def char_no @char_no end |
#line_no ⇒ Object (readonly)
Returns the value of attribute line_no.
56 57 58 |
# File 'lib/rdoc-f95/parsers/parse_rb.rb', line 56 def line_no @line_no end |
#text ⇒ Object
Returns the value of attribute text.
41 42 43 |
# File 'lib/rdoc-f95/parsers/parse_rb.rb', line 41 def text @text end |
Instance Method Details
#set_text(text) ⇒ Object
Because we’re used in contexts that expect to return a token, we set the text string and then return ourselves
51 52 53 54 |
# File 'lib/rdoc-f95/parsers/parse_rb.rb', line 51 def set_text(text) @text = text self end |