Class: RDoc::RubyToken::TkVal
Instance Attribute Summary collapse
-
#value ⇒ Object
(also: #text)
Returns the value of attribute value.
Attributes inherited from Token
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(seek, line_no, char_no, value = nil) ⇒ TkVal
constructor
A new instance of TkVal.
- #set_text(text) ⇒ Object
Constructor Details
#initialize(seek, line_no, char_no, value = nil) ⇒ TkVal
Returns a new instance of TkVal.
114 115 116 117 |
# File 'lib/rdoc/ruby_token.rb', line 114 def initialize(seek, line_no, char_no, value = nil) super(seek, line_no, char_no) @value = value end |
Instance Attribute Details
#value ⇒ Object Also known as: text
Returns the value of attribute value
118 119 120 |
# File 'lib/rdoc/ruby_token.rb', line 118 def value @value end |
Instance Method Details
#==(other) ⇒ Object
120 121 122 123 124 125 |
# File 'lib/rdoc/ruby_token.rb', line 120 def ==(other) self.class == other.class and other.line_no == @line_no and other.char_no == @char_no and other.value == @value end |
#set_text(text) ⇒ Object
127 128 129 130 |
# File 'lib/rdoc/ruby_token.rb', line 127 def set_text text @value = text self end |