This method is deprecated or moved on the latest stable version.
The last existing version (v1_9_2_180) is shown here.
set_comment(comment)
public
Set the comment for this section from the original
comment block If the first line contains :section:, strip it and use the
rest. Otherwise remove lines up to the line containing :section:, and look
for those lines again at the end and remove them. This lets us write
# blah blah blah## :SECTION: The title# The body
# File lib/rdoc/context.rb, line 150
def set_comment(comment)
return unless comment
if comment =~ /^#[ \t]*:section:.*\n/ then
start = $`
rest = $'
if start.empty?
@comment = rest
else
@comment = rest.sub(/#{start.chomp}\Z/, '')
end
else
@comment = comment
end
@comment = nil if @comment.empty?
end