Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add patch

  • Loading branch information...
commit daca0cce64dfe6082e229ffa37562844aff539a5 1 parent fc67080
@joshbuddy authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/http_router.rb
View
5 lib/http_router.rb
@@ -125,6 +125,11 @@ def delete(path, opts = {}, &app); add_with_request_method(path, :delete, opts,
# Returns the route object.
def put(path, opts = {}, &app); add_with_request_method(path, :put, opts, &app); end
+ # Adds a path that only responds to the request method +PATCH+.
+ #
+ # Returns the route object.
+ def patch(path, opts = {}, &app); add_with_request_method(path, :patch, 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)
Please sign in to comment.
Something went wrong with that request. Please try again.