summaryrefslogtreecommitdiff
path: root/lib/rdoc/generators/html_generator.rb
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-19 14:26:05 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-19 14:26:05 +0000
commitba3a872a68618be4ab402850bccda1988955f57a (patch)
tree1b688961e8878aebb0ae6b3b5c46205d362772ac /lib/rdoc/generators/html_generator.rb
parent0425463a3dd625cb6ce489d2fd180b78c23d7961 (diff)
Support visibility modifiers for attributes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/generators/html_generator.rb')
-rw-r--r--lib/rdoc/generators/html_generator.rb16
1 files changed, 11 insertions, 5 deletions
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