summaryrefslogtreecommitdiff
path: root/lib/rdoc/generator/template
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/generator/template')
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
index 1420da3201..6808b2bf87 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
@@ -1,11 +1,6 @@
-<%- if klass.type == 'class' then %>
+<%- if klass.type == 'class' && (ancestors = klass.super_classes).any? -%>
<div id="parent-class-section" class="nav-section">
- <h3>Parent</h3>
-
- <%- if klass.superclass and not String === klass.superclass then -%>
- <p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a>
- <%- else -%>
- <p class="link"><%= klass.superclass %>
- <%- end -%>
+ <h3>Ancestors</h3>
+ <%= generate_ancestor_list(ancestors, klass) %>
</div>
<%- end -%>