lib/usher/node/root.rb in usher-0.7.2 vs lib/usher/node/root.rb in usher-0.7.3
- old
+ new
@@ -24,9 +24,13 @@
[:normal, :greedy, :request].each { |type| node.send(type).values.each { |v| unique_routes(v, routes) } if node.send(type) }
routes.uniq!
routes
end
+ def lookup(request_object, path)
+ find(request_object, path, route_set.splitter.split(path))
+ end
+
private
def set_path_with_destination(path, destination = path)
nodes = [path.parts ? path.parts.inject(self){ |node, key| process_path_part(node, key)} : self]
nodes = process_request_parts(nodes, request_methods_for_path(path)) if request_methods