diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-12 05:16:53 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-12 05:16:53 +0000 |
commit | 182ce60f7552ec62b1d97fbc3e701f9405b12291 (patch) | |
tree | bfac61fbc39bfc823dc8fb0ea6c6f0ffff384a91 /lib/rdoc/generator | |
parent | f92db3dd73328b9743a91654453e51cdef19ea4c (diff) |
* 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/generator')
-rw-r--r-- | lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml | 8 | ||||
-rw-r--r-- | lib/rdoc/generator/template/darkfish/table_of_contents.rhtml | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml index 225f811f0e..7842625840 100644 --- a/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +++ b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml @@ -1,4 +1,10 @@ -<% table = current.parse(current.comment).table_of_contents +<% comment = if current.respond_to? :comment_location then + current.comment_location + else + current.comment + end + table = current.parse(comment).table_of_contents + if table.length > 1 then %> <div id="table-of-contents"> <nav class="section"> diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml index 8f19085bb4..bebff40f6a 100644 --- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml @@ -30,7 +30,7 @@ <li class="<%= klass.type %>"> <a href="<%= klass.path %>"><%= klass.full_name %></a> <% table = [] - table.concat klass.parse(klass.comment).table_of_contents + table.concat klass.parse(klass.comment_location).table_of_contents table.concat klass.section_contents unless table.empty? then %> |