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:
drbrain 2010-12-20 03:22:49 +00:00
parent d7effd506f
commit 2ef9c50c6e
106 changed files with 8878 additions and 4179 deletions

View file

@ -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