Skip to content

Commit d1ba4ca

Browse files
committed
Remove unused file_dir attribute
Similar to the class_dir attribute, the file_dir attribute never returns anything but nil.
1 parent 681a190 commit d1ba4ca

File tree

6 files changed

+3
-27
lines changed

6 files changed

+3
-27
lines changed

lib/rdoc/code_object/top_level.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def page_name
246246
# Path to this file for use with HTML generator output.
247247

248248
def path
249-
http_url @store.rdoc.generator.file_dir
249+
http_url(nil)
250250
end
251251

252252
def pretty_print q # :nodoc:

lib/rdoc/generator/darkfish.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,6 @@ def debug_msg *msg
184184
$stderr.puts(*msg)
185185
end
186186

187-
##
188-
# Directory where generated class HTML files live relative to the output
189-
# dir.
190-
191-
def file_dir
192-
nil
193-
end
194-
195187
##
196188
# Create the directories the generated docs will live in if they don't
197189
# already exist.

lib/rdoc/generator/json_index.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ class RDoc::Generator::JsonIndex
8686
attr_reader :index # :nodoc:
8787

8888
##
89-
# Creates a new generator. +parent_generator+ is used to determine the
90-
# file_dir of links in the output index.
91-
#
89+
# Creates a new generator.
9290
# +options+ are the same options passed to the parent generator.
9391

9492
def initialize parent_generator, options
@@ -265,13 +263,6 @@ def index_pages
265263
end
266264
end
267265

268-
##
269-
# The directory files are written to
270-
271-
def file_dir
272-
@parent_generator.file_dir
273-
end
274-
275266
def reset files, classes # :nodoc:
276267
@files = files
277268
@classes = classes

test/rdoc/support/test_case.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ def setup
5353
@rdoc.store = @store
5454
@rdoc.options = RDoc::Options.new
5555

56-
g = Object.new
57-
def g.file_dir() end
58-
@rdoc.generator = g
56+
@rdoc.generator = Object.new
5957

6058
RDoc::Markup::PreProcess.reset
6159
end

test/rdoc/test_rdoc_generator_json_index.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ def test_build_index
8080
assert_equal expected, index
8181
end
8282

83-
def test_file_dir
84-
assert_equal @darkfish.file_dir, @g.file_dir
85-
end
86-
8783
def test_generate
8884
@g.generate
8985

test/rdoc/xref_test_case.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def setup
3030
@top_levels.push @example_md
3131

3232
generator = Object.new
33-
def generator.file_dir() nil end
3433
@rdoc.options = @options
3534
@rdoc.generator = generator
3635

0 commit comments

Comments
 (0)