#-- - don't display comment from this point forward
This routine modifies it’s parameter
# File lib/rdoc/parser/ruby.rb, line 1724
def look_for_directives_in(context, comment)
preprocess = RDoc::Markup::PreProcess.new(@file_name,
@options.rdoc_include)
preprocess.handle(comment) do |directive, param|
case directive
when 'enddoc' then
throw :enddoc
when 'main' then
@options.main_page = param
''
when 'method', 'singleton-method' then
false # ignore
when 'section' then
context.set_current_section(param, comment)
comment.replace ''
break
when 'startdoc' then
context.start_doc
context.force_documentation = true
''
when 'stopdoc' then
context.stop_doc
''
when 'title' then
@options.title = param
''
else
warn "Unrecognized directive '#{directive}'"
false
end
end
remove_private_comments(comment)
end