Permalink
Browse files

add patch

  • Loading branch information...
1 parent fc67080 commit daca0cce64dfe6082e229ffa37562844aff539a5 @joshbuddy committed Mar 2, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/http_router.rb
View
@@ -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)

0 comments on commit daca0cc

Please sign in to comment.