Skip to content

Commit b8c0da1

Browse files
committed
Remove unused MethodAttr#output_name
1 parent d5776df commit b8c0da1

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

lib/rdoc/code_object/method_attr.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -313,19 +313,6 @@ def name_prefix
313313
@singleton ? '::' : '#'
314314
end
315315

316-
##
317-
# Name for output to HTML. For class methods the full name with a "." is
318-
# used like +SomeClass.method_name+. For instance methods the class name is
319-
# used if +context+ does not match the parent.
320-
#
321-
# This is to help prevent people from using :: to call class methods.
322-
323-
def output_name context
324-
return "#{name_prefix}#{@name}" if context == parent
325-
326-
"#{parent_name}#{@singleton ? '.' : '#'}#{@name}"
327-
end
328-
329316
##
330317
# Method/attribute name with class/instance indicator
331318

test/rdoc/test_rdoc_method_attr.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,6 @@ def test_is_alias_for
124124
assert_equal @c2_b, @c2_a.is_alias_for
125125
end
126126

127-
def test_output_name
128-
assert_equal '#m', @c1_m.output_name(@c1)
129-
assert_equal '::m', @c1__m.output_name(@c1)
130-
131-
assert_equal 'C1#m', @c1_m.output_name(@c2)
132-
assert_equal 'C1.m', @c1__m.output_name(@c2)
133-
end
134-
135127
def test_search_record
136128
@c1_m.comment = 'This is a comment.'
137129

0 commit comments

Comments
 (0)