Method: PathRouter::Router#lookup
- Defined in:
- lib/path_router/router.rb
#lookup(method, path) ⇒ Object
method e.g. “GET”, currently unused path e.g. “/some/path?including=query+string”
38 39 40 41 42 43 |
# File 'lib/path_router/router.rb', line 38 def lookup(method, path) _, backend = @routes.detect do |pattern, _| path =~ pattern end @backends[backend] end |