Class: Navy::Router
- Inherits:
-
Object
- Object
- Navy::Router
- Defined in:
- lib/navy/router.rb
Defined Under Namespace
Classes: NullHandler, Routes
Instance Method Summary collapse
-
#initialize(options = {}) {|@routes| ... } ⇒ Router
constructor
A new instance of Router.
- #route(request, options = {}) ⇒ Object
Constructor Details
Instance Method Details
#route(request, options = {}) ⇒ Object
44 45 46 47 48 49 |
# File 'lib/navy/router.rb', line 44 def route(request, = {}) opts = @options.merge() handler, params = @routes.obtain(request.key) params = opts.merge params dispatch(handler, params, request) end |