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)
#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. Returns a new instance of Router
The call handler setup to route a request given the mappings specified.
Map a route path and host to a specified application.
© 2010–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Router