Method: RDoc::Servlet#initialize
- Defined in:
- lib/rdoc/servlet.rb
#initialize(server, stores, cache, mount_path = nil, extra_doc_dirs = []) ⇒ Servlet
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.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/rdoc/servlet.rb', line 69 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.('../generator/template/json_index/', __FILE__), } end |