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)
-
- (Boolean) connect?
Whether or not the Request uses the CONNECT Method.
-
- (Boolean) delete?
Whether or not the Request uses the DELETE Method.
-
- (Boolean) get?
Whether or not the Request uses the GET Method.
-
- (Boolean) head?
Whether or not the Request uses the HEAD Method.
-
- (Boolean) idempotent?
Whether or not the Request is idempotent based on the Method.
-
- (Boolean) options?
Whether or not the Request uses the OPTIONS Method.
-
- (Boolean) patch?
Whether or not the Request uses the PATCH Method.
-
- (Boolean) post?
Whether or not the Request uses the POST Method.
-
- (Boolean) put?
Whether or not the Request uses the PUT Method.
-
- (Boolean) safe?
Whether or not the Request is safe based on the Method.
-
- (Boolean) trace?
Whether or not the Request uses the TRACE Method.
Instance Method Details
- (Boolean) connect?
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 |
- (Boolean) delete?
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 |
- (Boolean) get?
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 |
- (Boolean) head?
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 |
- (Boolean) idempotent?
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 |
- (Boolean) options?
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 |
- (Boolean) patch?
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 |
- (Boolean) post?
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 |
- (Boolean) put?
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 |
- (Boolean) safe?
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 |
- (Boolean) trace?
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 |