Internal: Adds a post-processor which sets the RDoc section based on the comment’s status.
Returns nothing.
# File lib/rdoc/tom_doc.rb, line 53
def self.add_post_processor # :nodoc:
RDoc::Markup::PreProcess.post_process do |comment, code_object|
next unless code_object and
RDoc::Comment === comment and comment.format == 'tomdoc'
comment.text.gsub!(/(\A\s*# )(Public|Internal|Deprecated):\s+/) do
section = code_object.add_section $2
code_object.temporary_section = section
$1
end
end
end