mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc.rb: Updated to RDoc 3.6
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fe89874540
commit
0b6da24a5e
28 changed files with 593 additions and 97 deletions
|
|
@ -480,7 +480,7 @@ class RDoc::Context < RDoc::CodeObject
|
|||
# Adds included module +include+ which should be an RDoc::Include
|
||||
|
||||
def add_include(include)
|
||||
add_to @includes, include
|
||||
add_to @includes, include unless @includes.map { |i| i.full_name }.include?( include.full_name )
|
||||
end
|
||||
|
||||
##
|
||||
|
|
@ -950,10 +950,14 @@ class RDoc::Context < RDoc::CodeObject
|
|||
##
|
||||
# Yields AnyMethod and Attr entries matching the list of names in +methods+.
|
||||
|
||||
def methods_matching(methods, singleton = false)
|
||||
def methods_matching(methods, singleton = false, &block)
|
||||
(@method_list + @attributes).each do |m|
|
||||
yield m if methods.include?(m.name) and m.singleton == singleton
|
||||
end
|
||||
|
||||
each_ancestor do |parent|
|
||||
parent.methods_matching(methods, singleton, &block)
|
||||
end
|
||||
end
|
||||
|
||||
##
|
||||
|
|
@ -1021,11 +1025,19 @@ class RDoc::Context < RDoc::CodeObject
|
|||
remove_invisible_in @attributes, min_visibility
|
||||
end
|
||||
|
||||
##
|
||||
# Only called when min_visibility == :public or :private
|
||||
|
||||
def remove_invisible_in(array, min_visibility) # :nodoc:
|
||||
if min_visibility == :public
|
||||
array.reject! { |e| e.visibility != :public }
|
||||
array.reject! { |e|
|
||||
e.visibility != :public and not e.force_documentation
|
||||
}
|
||||
else
|
||||
array.reject! { |e| e.visibility == :private }
|
||||
array.reject! { |e|
|
||||
e.visibility == :private and
|
||||
not e.force_documentation
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue