Permalink
Browse files

Add Request.trace? and Request.options?

  • Loading branch information...
1 parent 827cd4f commit 320d80091e6febdbea2b01b6ba7e8719488250e5 @manveru manveru committed Jun 11, 2010
Showing with 7 additions and 5 deletions.
  1. +7 −5 lib/rack/request.rb
View
@@ -80,11 +80,13 @@ def host
def script_name=(s); @env["SCRIPT_NAME"] = s.to_s end
def path_info=(s); @env["PATH_INFO"] = s.to_s end
- def get?; request_method == "GET" end
- def post?; request_method == "POST" end
- def put?; request_method == "PUT" end
- def delete?; request_method == "DELETE" end
- def head?; request_method == "HEAD" end
+ def delete?; request_method == "DELETE" end
+ def get?; request_method == "GET" end
+ def head?; request_method == "HEAD" end
+ def options?; request_method == "OPTIONS" end
+ def post?; request_method == "POST" end
+ def put?; request_method == "PUT" end
+ def trace?; request_method == "TRACE" end
# The set of form-data media-types. Requests that do not indicate
# one of the media types presents in this list will not be eligible

0 comments on commit 320d800

Please sign in to comment.