Module: Webbed::Helpers::MethodHelper
- Included in:
- Request
- Defined in:
- lib/webbed/helpers/method_helper.rb
Overview
Request helper for the Method
Instance Method Summary collapse
-
#connect? ⇒ Boolean
Whether or not the Request uses the CONNECT Method.
-
#delete? ⇒ Boolean
Whether or not the Request uses the DELETE Method.
-
#get? ⇒ Boolean
Whether or not the Request uses the GET Method.
-
#head? ⇒ Boolean
Whether or not the Request uses the HEAD Method.
-
#idempotent? ⇒ Boolean
Whether or not the Request is idempotent based on the Method.
-
#options? ⇒ Boolean
Whether or not the Request uses the OPTIONS Method.
-
#patch? ⇒ Boolean
Whether or not the Request uses the PATCH Method.
-
#post? ⇒ Boolean
Whether or not the Request uses the POST Method.
-
#put? ⇒ Boolean
Whether or not the Request uses the PUT Method.
-
#safe? ⇒ Boolean
Whether or not the Request is safe based on the Method.
-
#trace? ⇒ Boolean
Whether or not the Request uses the TRACE Method.
Instance Method Details
#connect? ⇒ Boolean
Whether or not the Request uses the CONNECT Method
71 72 73 |
# File 'lib/webbed/helpers/method_helper.rb', line 71 def connect? method == 'CONNECT' end |
#delete? ⇒ Boolean
Whether or not the Request uses the DELETE Method
57 58 59 |
# File 'lib/webbed/helpers/method_helper.rb', line 57 def delete? method == 'DELETE' end |
#get? ⇒ Boolean
Whether or not the Request uses the GET Method
29 30 31 |
# File 'lib/webbed/helpers/method_helper.rb', line 29 def get? method == 'GET' end |
#head? ⇒ Boolean
Whether or not the Request uses the HEAD Method
36 37 38 |
# File 'lib/webbed/helpers/method_helper.rb', line 36 def head? method == 'HEAD' end |
#idempotent? ⇒ Boolean
Whether or not the Request is idempotent based on the Method
15 16 17 |
# File 'lib/webbed/helpers/method_helper.rb', line 15 def idempotent? method.idempotent? end |
#options? ⇒ Boolean
Whether or not the Request uses the OPTIONS Method
22 23 24 |
# File 'lib/webbed/helpers/method_helper.rb', line 22 def method == 'OPTIONS' end |
#patch? ⇒ Boolean
Whether or not the Request uses the PATCH Method
78 79 80 |
# File 'lib/webbed/helpers/method_helper.rb', line 78 def patch? method == 'PATCH' end |
#post? ⇒ Boolean
Whether or not the Request uses the POST Method
43 44 45 |
# File 'lib/webbed/helpers/method_helper.rb', line 43 def post? method == 'POST' end |
#put? ⇒ Boolean
Whether or not the Request uses the PUT Method
50 51 52 |
# File 'lib/webbed/helpers/method_helper.rb', line 50 def put? method == 'PUT' end |
#safe? ⇒ Boolean
Whether or not the Request is safe based on the Method
8 9 10 |
# File 'lib/webbed/helpers/method_helper.rb', line 8 def safe? method.safe? end |
#trace? ⇒ Boolean
Whether or not the Request uses the TRACE Method
64 65 66 |
# File 'lib/webbed/helpers/method_helper.rb', line 64 def trace? method == 'TRACE' end |