Padrino::Router
Class: Padrino::Router
- Inherits:
- Object
- Object
- Padrino::Router
Overview
This class is an extended version of Rack::URLMap.
Padrino::Router like Rack::URLMap dispatches in such a way that the longest paths are tried first, since they are most specific.
Features:
-
Map a path to the specified App
-
Ignore server names (this solve issues with vhost and domain aliases)
-
Use hosts instead of server name for mappings (this help us with our vhost and domain aliases)
Instance Method Summary
-
#call(env) ⇒ Object
The call handler setup to route a request given the mappings specified. -
#initialize(*mapping, &block) ⇒ Router
constructor A new instance of Router. -
#map(options = {}) ⇒ Array
Map a route path and host to a specified application.
Constructor Details
#initialize(*mapping, &block) ⇒ Router
Returns a new instance of Router
Instance Method Details
#call(env) ⇒ Object
The call handler setup to route a request given the mappings specified.
#map(options = {}) ⇒ Array
Map a route path and host to a specified application.
© 2010–2016 Padrino
Licensed under the MIT License.
http://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Router