Skip to content

Commit cca0218

Browse files
committed
Split nav between class and instance methods
1 parent cce3487 commit cca0218

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
<%- unless klass.method_list.empty? then %>
2-
<!-- Method Quickref -->
3-
<div class="nav-section">
4-
<h3>Methods</h3>
1+
<div class="nav-section">
2+
<% if (class_methods = klass.class_method_list.sort).any? %>
3+
<h3>Class Methods</h3>
4+
<ul class="link-list" role="directory">
5+
<%- class_methods.each do |meth| -%>
6+
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h "::#{meth.name}" -%></a>
7+
<%- end -%>
8+
</ul>
9+
<% end %>
510

11+
<% if (instance_methods = klass.instance_method_list.sort).any? %>
12+
<h3>Instance Methods</h3>
613
<ul class="link-list" role="directory">
7-
<%- klass.each_method do |meth| -%>
8-
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name -%></a>
14+
<%- klass.instance_method_list.sort.each do |meth| -%>
15+
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h "##{meth.name}" -%></a>
916
<%- end -%>
1017
</ul>
11-
</div>
12-
<%- end -%>
18+
<% end %>
19+
</div>

0 commit comments

Comments
 (0)