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.
-
#inspect ⇒ Object
:nodoc:.
- #set_text(text) ⇒ Object
Constructor Details
#initialize(seek, line_no, char_no, value = nil) ⇒ TkVal
Returns a new instance of TkVal.
131 132 133 134 |
# File 'lib/rdoc/ruby_token.rb', line 131 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
135 136 137 |
# File 'lib/rdoc/ruby_token.rb', line 135 def value @value end |
Instance Method Details
#==(other) ⇒ Object
137 138 139 140 141 142 |
# File 'lib/rdoc/ruby_token.rb', line 137 def ==(other) self.class == other.class and other.line_no == @line_no and other.char_no == @char_no and other.value == @value end |
#inspect ⇒ Object
:nodoc:
151 152 153 154 |
# File 'lib/rdoc/ruby_token.rb', line 151 def inspect # :nodoc: klass = self.class.name.split('::').last "{%s %s, %d:%d %p}" % [klass, @seek, @line_no, @char_no, @value] end |
#set_text(text) ⇒ Object
144 145 146 147 |
# File 'lib/rdoc/ruby_token.rb', line 144 def set_text text @value = text self end |