Class: RDoc::RubyToken::TkNode
Instance Attribute Summary collapse
-
#node ⇒ Object
(also: #text)
readonly
Returns the value of attribute node.
Attributes inherited from Token
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(seek, line_no, char_no, node = nil) ⇒ TkNode
constructor
A new instance of TkNode.
-
#inspect ⇒ Object
:nodoc:.
- #set_text(text) ⇒ Object
Constructor Details
#initialize(seek, line_no, char_no, node = nil) ⇒ TkNode
Returns a new instance of TkNode.
71 72 73 74 |
# File 'lib/rdoc/ruby_token.rb', line 71 def initialize(seek, line_no, char_no, node = nil) super seek, line_no, char_no @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly) Also known as: text
Returns the value of attribute node
76 77 78 |
# File 'lib/rdoc/ruby_token.rb', line 76 def node @node end |
Instance Method Details
#==(other) ⇒ Object
78 79 80 81 82 83 |
# File 'lib/rdoc/ruby_token.rb', line 78 def ==(other) self.class == other.class and other.line_no == @line_no and other.char_no == @char_no and other.node == @node end |
#inspect ⇒ Object
:nodoc:
92 93 94 95 |
# File 'lib/rdoc/ruby_token.rb', line 92 def inspect # :nodoc: klass = self.class.name.split('::').last "{%s %d, %d:%d %p}" % [klass, @seek, @line_no, @char_no, @node] end |
#set_text(text) ⇒ Object
85 86 87 88 |
# File 'lib/rdoc/ruby_token.rb', line 85 def set_text text @node = text self end |