mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Import RDoc 3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d7effd506f
commit
2ef9c50c6e
106 changed files with 8878 additions and 4179 deletions
|
@ -6,10 +6,10 @@ require 'rdoc/class_module'
|
|||
class RDoc::NormalClass < RDoc::ClassModule
|
||||
|
||||
##
|
||||
# Ancestor ClassModules
|
||||
# Appends the superclass, if any, to the included modules.
|
||||
|
||||
def ancestors
|
||||
includes + [superclass]
|
||||
superclass ? super + [superclass] : super
|
||||
end
|
||||
|
||||
def inspect # :nodoc:
|
||||
|
@ -20,6 +20,15 @@ class RDoc::NormalClass < RDoc::ClassModule
|
|||
]
|
||||
end
|
||||
|
||||
def to_s # :nodoc:
|
||||
display = "#{self.class.name} #{self.full_name}"
|
||||
if superclass
|
||||
display << ' < ' << (superclass.is_a?(String) ? superclass : superclass.full_name)
|
||||
end
|
||||
display << ' -> ' << is_alias_for.to_s if is_alias_for
|
||||
display
|
||||
end
|
||||
|
||||
def pretty_print q # :nodoc:
|
||||
superclass = @superclass ? " < #{@superclass}" : nil
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue