method
parse
ruby latest stable - Class:
RDoc ::ClassModule
parse(comment_location)public
Parses comment_location into an RDoc::Markup::Document composed of multiple RDoc::Markup::Documents with their file set.
# File lib/rdoc/class_module.rb, line 587
def parse comment_location
case comment_location
when String then
super
when Array then
docs = comment_location.map do |comment, location|
doc = super comment
doc.file = location
doc
end
RDoc::Markup::Document.new(*docs)
when RDoc::Comment then
doc = super comment_location.text, comment_location.format
doc.file = comment_location.location
doc
when RDoc::Markup::Document then
return comment_location
else
raise ArgumentError, "unknown comment class #{comment_location.class}"
end
end