In Files

  • rdoc/parser/ruby.rb

Parent

Methods

Files

Class/Module Index [+]

Quicksearch

RDoc::RubyToken::Token

Constants

NO_TEXT

Attributes

char_no[R]
line_no[R]
text[RW]

Public Class Methods

new(line_no, char_no) click to toggle source
 
               # File rdoc/parser/ruby.rb, line 41
def initialize(line_no, char_no)
  @line_no = line_no
  @char_no = char_no
  @text    = NO_TEXT
end
            

Public Instance Methods

==(other) click to toggle source
 
               # File rdoc/parser/ruby.rb, line 47
def ==(other)
  self.class == other.class and
    other.line_no == @line_no and
    other.char_no == @char_no and
    other.text == @text
end
            
set_text(text) click to toggle source

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

 
               # File rdoc/parser/ruby.rb, line 58
def set_text(text)
  @text = text
  self
end