Class RubyToken::Token
In: lib/irb/ruby-token.rb
lib/rdoc/parsers/parse_rb.rb
Parent: Object

Methods

new   new   set_text  

Constants

NO_TEXT = "??".freeze

Attributes

char_no  [R] 
char_no  [R] 
line_no  [R] 
line_no  [R] 
seek  [R] 
text  [R] 
text  [R] 

Public Class methods

[Source]

    # File lib/irb/ruby-token.rb, line 27
27:     def initialize(seek, line_no, char_no)
28:       @seek = seek
29:       @line_no = line_no
30:       @char_no = char_no
31:     end

[Source]

    # File lib/rdoc/parsers/parse_rb.rb, line 43
43:     def initialize(line_no, char_no)
44:       @line_no = line_no
45:       @char_no = char_no
46:       @text    = NO_TEXT
47:     end

Public Instance methods

Because we‘re used in contexts that expect to return a token, we set the text string and then return ourselves

[Source]

    # File lib/rdoc/parsers/parse_rb.rb, line 51
51:     def set_text(text)
52:       @text = text
53:       self
54:     end

[Validate]