Type:
Class

This is a WEBrick servlet that allows you to browse ri documentation.

You can show documentation through either `ri –server` or, with RubyGems 2.0 or newer, `gem server`. For ri, the server runs on port 8214 by default. For RubyGems the server runs on port 8808 by default.

You can use this servlet in your own project by mounting it on a WEBrick server:

1
2
3
4
5
require 'webrick'
 
server = WEBrick::HTTPServer.new Port: 8000
 
server.mount '/', RDoc::Servlet

If you want to mount the servlet some other place than the root, provide the base path when mounting:

1
server.mount '/rdoc', RDoc::Servlet, '/rdoc'
not_found
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

not_found(generator, req, res) Instance Public methods Returns a 404 page built

2025-01-10 15:47:30
generator_for
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

generator_for(store) Instance Public methods Instantiates a Darkfish generator

2025-01-10 15:47:30
documentation_source
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

documentation_source(path) Instance Public methods Returns the

2025-01-10 15:47:30
documentation_search
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

documentation_search(store, generator, req, res) Instance Public methods Creates

2025-01-10 15:47:30
root
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

root(req, res) Instance Public methods Generates the root page on res

2025-01-10 15:47:30
ri_paths
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

ri_paths(&block) Instance Public methods Enumerates the ri paths. See

2025-01-10 15:47:30
if_modified_since
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

if_modified_since(req, res, path = nil) Instance Public methods Handles the

2025-01-10 15:47:30
error
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

error(exception, req, res) Instance Public methods Generates an error page for

2025-01-10 15:47:30
store_for
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

store_for(source_name) Instance Public methods Returns an

2025-01-10 15:47:30
asset
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Servlet

asset(generator_name, req, res) Instance Public methods Serves the asset at

2025-01-10 15:47:30