Class: Borges::Dispatcher

# Borges::Dispatcher (Class)

In: | lib/Borges/RequestHandler/Dispatcher.rb
Parent: | Object

The Dispatcher dispatches incoming requests to the correct handler (entry point) and registers server entry points.

## Methods

entry_points handle_request handler_for_request new register remove url_prefix url_prefix=

## Constants

DEFAULT_URL_PREFIX | = | "/borges"

## Attributes

url_prefix | [RW] |

## Included Modules

::Singleton

## Public Class methods

new()
url_prefix()
url_prefix=(url_prefix)

## Public Instance methods

entry_points()

Retrieve a sorted copy of the Dispatcher’s entry points.

handle_request(req)

Pass the request off to the handler for the request.

handler_for_request(req)

Retrieve the handler for the request. If no entry point matches, return the NotFoundHandler.

register(entry_point, path)

Register a new entry point at `path`. The handler be invoked on requests to "#{@url_prefix}/#{path}".

remove(entry_point)

Unregister an entry point and return it.

[Validate]