add patch & trace & connect

This commit is contained in:
Josh Hull 2012-03-16 15:24:52 -07:00
parent daca0cce64
commit bee0be1815
1 changed files with 15 additions and 0 deletions

View File

@ -130,6 +130,21 @@ class HttpRouter
# Returns the route object.
def patch(path, opts = {}, &app); add_with_request_method(path, :patch, opts, &app); end
# Adds a path that only responds to the request method +OPTIONS+.
#
# Returns the route object.
def patch(path, opts = {}, &app); add_with_request_method(path, :patch, opts, &app); end
# Adds a path that only responds to the request method +OPTIONS+.
#
# Returns the route object.
def trace(path, opts = {}, &app); add_with_request_method(path, :trace, opts, &app); end
# Adds a path that only responds to the request method +OPTIONS+.
#
# Returns the route object.
def conenct(path, opts = {}, &app); add_with_request_method(path, :conenct, opts, &app); end
# Performs recoginition without actually calling the application and returns an array of all
# matching routes or nil if no match was found.
def recognize(env, &callback)