aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/class_module.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-12 05:16:53 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-12 05:16:53 +0000
commit182ce60f7552ec62b1d97fbc3e701f9405b12291 (patch)
treebfac61fbc39bfc823dc8fb0ea6c6f0ffff384a91 /lib/rdoc/class_module.rb
parentf92db3dd73328b9743a91654453e51cdef19ea4c (diff)
downloadruby-182ce60f7552ec62b1d97fbc3e701f9405b12291.tar.gz
* lib/rdoc/class_module.rb: Added RDoc::ClassModule#documented? which
checks comment_location. Hide RDoc::ClassModule#comment=. * test/rdoc/test_rdoc_class_module.rb: Test for above. * lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml: Fix display of the table of contents in the sidebar. * lib/rdoc/generator/template/darkfish/table_of_contents.rhtml: Use #comment_location when displaying classes or modules. * test/rdoc/test_rdoc_store.rb: Use comment_location. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/class_module.rb')
-rw-r--r--lib/rdoc/class_module.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/rdoc/class_module.rb b/lib/rdoc/class_module.rb
index e2bb9de68d..a520503598 100644
--- a/lib/rdoc/class_module.rb
+++ b/lib/rdoc/class_module.rb
@@ -184,7 +184,7 @@ class RDoc::ClassModule < RDoc::Context
# Appends +comment+ to the current comment, but separated by a rule. Works
# more like <tt>+=</tt>.
- def comment= comment
+ def comment= comment # :nodoc:
comment = case comment
when RDoc::Comment then
comment.normalize
@@ -217,6 +217,14 @@ class RDoc::ClassModule < RDoc::Context
end
##
+ # Does this class or module have a comment with content or is
+ # #received_nodoc true?
+
+ def documented?
+ super or !@comment_location.empty?
+ end
+
+ ##
# Iterates the ancestors of this class or module for which an
# RDoc::ClassModule exists.