Fills in res with the class, module or page for req from
store.
path is relative to the mount_path and is used to determine the
class, module or page name (/RDoc/Servlet.html
becomes RDoc::Servlet). generator
is used to create the page.
# File lib/rdoc/servlet.rb, line 146
def documentation_page store, generator, path, req, res
name = path.sub(/.html$/, '').gsub '/', '::'
if klass = store.find_class_or_module(name) then
res.body = generator.generate_class klass
elsif page = store.find_text_page(name.sub(/_([^_]*)$/, '.\1')) then
res.body = generator.generate_page page
else
not_found generator, req, res
end
end