Displays documentation for req on res, whether that be HTML or some asset.
# File lib/rdoc/servlet.rb, line 387
def show_documentation req, res
store, path = documentation_source req.path
if_modified_since req, res, store.cache_path
generator = generator_for store
case path
when nil, '', 'index.html' then
res.body = generator.generate_index
when 'table_of_contents.html' then
res.body = generator.generate_table_of_contents
when 'js/search_index.js' then
documentation_search store, generator, req, res
else
documentation_page store, generator, path, req, res
end
ensure
res.content_type ||= 'text/html'
end