From 91e34f580056feff955825060527861b7e24f634 Mon Sep 17 00:00:00 2001 From: Denis Sukhonin Date: Fri, 6 Apr 2012 19:15:38 +0400 Subject: [PATCH] Handle PATCH method. --- lib/yard/sinatra.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/yard/sinatra.rb b/lib/yard/sinatra.rb index 39b2faf..a3e4638 100644 --- a/lib/yard/sinatra.rb +++ b/lib/yard/sinatra.rb @@ -100,6 +100,7 @@ module YARD handles method_call(:get) handles method_call(:post) handles method_call(:put) + handles method_call(:patch) handles method_call(:delete) handles method_call(:head) handles method_call(:not_found) @@ -117,7 +118,7 @@ module YARD module Legacy class RouteHandler < Ruby::Legacy::Base include AbstractRouteHandler - handles /\A(get|post|put|delete|head|not_found)[\s\(].*/m + handles /\A(get|post|put|patch|delete|head|not_found)[\s\(].*/m def http_verb statement.tokens.first.text.upcase