-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split list of class and instance methods in two (#1206)
Looking for a method is easier because eyes don't have to skip dashes or double colon.
- Loading branch information
1 parent
50dda13
commit 6852567
Showing
1 changed file
with
20 additions
and
11 deletions.
There are no files selected for viewing
31 changes: 20 additions & 11 deletions
31
lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
<%- unless klass.method_list.empty? then %> | ||
<!-- Method Quickref --> | ||
<div id="method-list-section" class="nav-section"> | ||
<h3>Methods</h3> | ||
<% if (class_methods = klass.class_method_list.sort).any? %> | ||
<div class="nav-section"> | ||
<h3>Class Methods</h3> | ||
<ul class="link-list" role="directory"> | ||
<%- class_methods.each do |meth| -%> | ||
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li> | ||
<%- end -%> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
||
<ul class="link-list" role="directory"> | ||
<%- klass.each_method do |meth| -%> | ||
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name -%></a> | ||
<%- end -%> | ||
</ul> | ||
</div> | ||
<%- end -%> | ||
<% if (instance_methods = klass.instance_methods.sort).any? %> | ||
<div class="nav-section"> | ||
<h3>Instance Methods</h3> | ||
<ul class="link-list" role="directory"> | ||
<%- instance_methods.each do |meth| -%> | ||
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li> | ||
<%- end -%> | ||
</ul> | ||
</div> | ||
<% end %> |