Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 34a27fd

Browse files
committedMar 1, 2025··
Reuse @classes ivar in ToCs page
1 parent d9dd070 commit 34a27fd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎lib/rdoc/generator/template/darkfish/table_of_contents.rhtml

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<h2 id="classes">Classes and Modules</h2>
3838
<ul>
39-
<%- get_sorted_module_list(@classes).each do |klass| -%>
39+
<%- @classes.select(&:display?).each do |klass| -%>
4040
<li class="<%= klass.type %>">
4141
<a href="<%= klass.path %>"><%= klass.full_name %></a>
4242
<%- table = []
@@ -57,9 +57,7 @@
5757

5858
<h2 id="methods">Methods</h2>
5959
<ul>
60-
<%- @store.all_classes_and_modules.flat_map do |mod|
61-
mod.method_list
62-
end.sort.each do |method| %>
60+
<%- @classes.flat_map(&:method_list).sort.each do |method| %>
6361
<li class="method">
6462
<a href="<%= method.path %>"><%= h method.pretty_name %></a>
6563
&mdash;

0 commit comments

Comments
 (0)
Please sign in to comment.