1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Support visibility modifiers for attributes

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
dave 2004-02-19 14:26:05 +00:00
parent bab666da0b
commit 81f62f41f1
3 changed files with 37 additions and 7 deletions

View file

@ -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