Skip to content

Commit bff3d05

Browse files
committed
Remove unused CodeObject#viewer
1 parent 9df3447 commit bff3d05

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

lib/rdoc/code_object.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,6 @@ class RDoc::CodeObject
8989

9090
attr_reader :store
9191

92-
##
93-
# We are the model of the code, but we know that at some point we will be
94-
# worked on by viewers. By implementing the Viewable protocol, viewers can
95-
# associated themselves with these objects.
96-
97-
attr_accessor :viewer
98-
9992
##
10093
# When mixed-in to a class, this points to the Context in which it was originally defined.
10194

lib/rdoc/code_object/class_module.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def self.from_module class_type, mod
5656

5757
klass.parent = mod.parent
5858
klass.section = mod.section
59-
klass.viewer = mod.viewer
6059

6160
klass.attributes.concat mod.attributes
6261
klass.method_list.concat mod.method_list

test/rdoc/test_rdoc_parser_ruby.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,6 @@ def test_parse_comment_attr
12771277
assert_equal @top_level, foo.file
12781278
assert_equal 1, foo.line
12791279

1280-
assert_nil foo.viewer
12811280
assert_equal true, foo.document_children
12821281
assert_equal true, foo.document_self
12831282
assert_equal false, foo.done_documenting
@@ -1344,7 +1343,6 @@ def test_parse_comment_method
13441343
assert_nil foo.block_params
13451344
assert_nil foo.call_seq
13461345
assert_nil foo.is_alias_for
1347-
assert_nil foo.viewer
13481346
assert_equal true, foo.document_children
13491347
assert_equal true, foo.document_self
13501348
assert_equal '', foo.params
@@ -1677,7 +1675,6 @@ def test_parse_meta_method
16771675
assert_equal klass, foo.parent
16781676
assert_equal false, foo.singleton
16791677
assert_equal 'add_my_method :foo', foo.text
1680-
assert_nil foo.viewer
16811678
assert_equal :public, foo.visibility
16821679
assert_equal klass.current_section, foo.section
16831680

@@ -1878,7 +1875,6 @@ def test_parse_method
18781875
assert_nil foo.block_params
18791876
assert_nil foo.call_seq
18801877
assert_nil foo.is_alias_for
1881-
assert_nil foo.viewer
18821878
assert_equal true, foo.document_children
18831879
assert_equal true, foo.document_self
18841880
assert_equal '()', foo.params

0 commit comments

Comments
 (0)