Skip to content

Commit d9dd070

Browse files
committed
Remove unnecessary ivars from darkfish
1 parent df9b2b0 commit d9dd070

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

lib/rdoc/generator/darkfish.rb

-14
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,6 @@ class RDoc::Generator::Darkfish
128128

129129
attr_reader :json_index
130130

131-
##
132-
# Methods to be displayed by this generator
133-
134-
attr_reader :methods
135-
136-
##
137-
# Sorted list of classes and modules to be displayed by this generator
138-
139-
attr_reader :modsort
140-
141131
##
142132
# The RDoc::Store that is the source of the generated content
143133

@@ -170,8 +160,6 @@ def initialize store, options
170160
@classes = nil
171161
@context = nil
172162
@files = nil
173-
@methods = nil
174-
@modsort = nil
175163

176164
@json_index = RDoc::Generator::JsonIndex.new self, options
177165
end
@@ -620,8 +608,6 @@ def setup
620608

621609
@classes = @store.all_classes_and_modules.sort
622610
@files = @store.all_files.sort
623-
@methods = @classes.flat_map { |m| m.method_list }.sort
624-
@modsort = get_sorted_module_list @classes
625611
@page_files = @files.select { |f| f.text? }
626612
end
627613

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

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

3737
<h2 id="classes">Classes and Modules</h2>
3838
<ul>
39-
<%- @modsort.each do |klass| -%>
39+
<%- get_sorted_module_list(@classes).each do |klass| -%>
4040
<li class="<%= klass.type %>">
4141
<a href="<%= klass.path %>"><%= klass.full_name %></a>
4242
<%- table = []

test/rdoc/test_rdoc_generator_darkfish.rb

-2
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ def test_setup
300300
assert_equal [@klass_alias, @ignored, @klass, @object],
301301
@g.classes.sort_by { |klass| klass.full_name }
302302
assert_equal [@top_level], @g.files
303-
assert_equal [@meth, @meth, @meth_bang, @meth_bang, @meth_with_html_tag_yield, @meth_with_html_tag_yield], @g.methods
304-
assert_equal [@klass_alias, @klass, @object], @g.modsort
305303
end
306304

307305
def test_template_for

0 commit comments

Comments
 (0)