new(server, stores, cache, mount_path = nil, extra_doc_dirs = [])
public
Creates a new WEBrick servlet.
Use mount_path when mounting the servlet somewhere other than /.
Use extra_doc_dirs for additional documentation directories.
server is provided automatically by WEBrick when mounting. stores and
cache are provided automatically by the servlet.
# File lib/rdoc/servlet.rb, line 64
def initialize server, stores, cache, mount_path = nil, extra_doc_dirs = []
super server
@cache = cache
@mount_path = mount_path
@extra_doc_dirs = extra_doc_dirs
@stores = stores
@options = RDoc::Options.new
@options.op_dir = '.'
darkfish_dir = nil
# HACK dup
$LOAD_PATH.each do |path|
darkfish_dir = File.join path, 'rdoc/generator/template/darkfish/'
next unless File.directory? darkfish_dir
@options.template_dir = darkfish_dir
break
end
@asset_dirs = {
:darkfish => darkfish_dir,
:json_index =>
File.expand_path('../generator/template/json_index/', __FILE__),
}
end