Class: RDoc::RubyToken::TkUnknownChar
- Defined in:
- lib/rdoc/ruby_token.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #text)
readonly
Returns the value of attribute name.
Attributes inherited from Token
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(seek, line_no, char_no, name) ⇒ TkUnknownChar
constructor
A new instance of TkUnknownChar.
-
#inspect ⇒ Object
:nodoc:.
- #set_text(text) ⇒ Object
Constructor Details
#initialize(seek, line_no, char_no, name) ⇒ TkUnknownChar
Returns a new instance of TkUnknownChar.
217 218 219 220 |
# File 'lib/rdoc/ruby_token.rb', line 217 def initialize(seek, line_no, char_no, name) super(seek, line_no, char_no) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly) Also known as: text
Returns the value of attribute name
221 222 223 |
# File 'lib/rdoc/ruby_token.rb', line 221 def name @name end |
Instance Method Details
#==(other) ⇒ Object
223 224 225 226 227 228 |
# File 'lib/rdoc/ruby_token.rb', line 223 def ==(other) self.class == other.class and other.line_no == @line_no and other.char_no == @char_no and other.name == @name end |
#inspect ⇒ Object
:nodoc:
237 238 239 240 |
# File 'lib/rdoc/ruby_token.rb', line 237 def inspect # :nodoc: klass = self.class.name.split('::').last "{%s %d, %d:%d %p}" % [klass, @seek, @line_no, @char_no, @name] end |
#set_text(text) ⇒ Object
230 231 232 233 |
# File 'lib/rdoc/ruby_token.rb', line 230 def set_text text @name = text self end |