mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc: Update to RDoc 3.9. Fixed ri []
, stopdoc creating an
object reference, nodoc for class aliases, verbatim === lines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4ac69a57b5
commit
89b601d176
33 changed files with 1329 additions and 600 deletions
|
@ -114,6 +114,7 @@ class RDoc::CodeObject
|
|||
@done_documenting = false
|
||||
@force_documentation = false
|
||||
@received_nodoc = false
|
||||
@ignored = false
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -139,6 +140,13 @@ class RDoc::CodeObject
|
|||
end
|
||||
end
|
||||
|
||||
##
|
||||
# Should this CodeObject be shown in documentation?
|
||||
|
||||
def display?
|
||||
@document_self and not @ignored
|
||||
end
|
||||
|
||||
##
|
||||
# Enables or disables documentation of this CodeObject's children unless it
|
||||
# has been turned off by :enddoc:
|
||||
|
@ -195,6 +203,11 @@ class RDoc::CodeObject
|
|||
self
|
||||
end
|
||||
|
||||
##
|
||||
# File name where this CodeObject was found.
|
||||
#
|
||||
# See also RDoc::Context#in_files
|
||||
|
||||
def file_name
|
||||
return unless @file
|
||||
|
||||
|
@ -220,6 +233,34 @@ class RDoc::CodeObject
|
|||
@full_name = full_name
|
||||
end
|
||||
|
||||
##
|
||||
# Use this to ignore a CodeObject and all its children until found again
|
||||
# (#record_location is called). An ignored item will not be shown in
|
||||
# documentation.
|
||||
#
|
||||
# See github issue #55
|
||||
#
|
||||
# The ignored status is temporary in order to allow implementation details
|
||||
# to be hidden. At the end of processing a file RDoc allows all classes
|
||||
# and modules to add new documentation to previously created classes.
|
||||
#
|
||||
# If a class was ignored (via stopdoc) then reopened later with additional
|
||||
# documentation it should be shown. If a class was ignored and never
|
||||
# reopened it should not be shown. The ignore flag allows this to occur.
|
||||
|
||||
def ignore
|
||||
@ignored = true
|
||||
|
||||
stop_doc
|
||||
end
|
||||
|
||||
##
|
||||
# Has this class been ignored?
|
||||
|
||||
def ignored?
|
||||
@ignored
|
||||
end
|
||||
|
||||
##
|
||||
# File name of our parent
|
||||
|
||||
|
@ -238,6 +279,7 @@ class RDoc::CodeObject
|
|||
# Records the RDoc::TopLevel (file) where this code object was defined
|
||||
|
||||
def record_location top_level
|
||||
@ignored = false
|
||||
@file = top_level
|
||||
end
|
||||
|
||||
|
@ -250,6 +292,7 @@ class RDoc::CodeObject
|
|||
|
||||
@document_self = true
|
||||
@document_children = true
|
||||
@ignored = false
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue