From ba3a872a68618be4ab402850bccda1988955f57a Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 19 Feb 2004 14:26:05 +0000 Subject: Support visibility modifiers for attributes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/generators/html_generator.rb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lib/rdoc/generators') diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb index 56ac2b7499..b7d3961b45 100644 --- a/lib/rdoc/generators/html_generator.rb +++ b/lib/rdoc/generators/html_generator.rb @@ -620,11 +620,17 @@ module Generators atts = @context.attributes.sort res = [] atts.each do |att| - res << { - "name" => CGI.escapeHTML(att.name), - "rw" => att.rw, - "a_desc" => markup(att.comment, true) - } + if att.visibility == :public || @options.show_all + entry = { + "name" => CGI.escapeHTML(att.name), + "rw" => att.rw, + "a_desc" => markup(att.comment, true) + } + unless att.visibility == :public + entry["rw"] << "-" + end + res << entry + end end res end -- cgit v1.2.3