Class: WebSvr::WebMethod
- Inherits:
-
Object
- Object
- WebSvr::WebMethod
- Defined in:
- lib/web_svr/web_method.rb
Constant Summary collapse
- GET =
'GET'.freeze
- POST =
'POST'.freeze
- PUT =
'PUT'.freeze
- DELETE =
'DELETE'.freeze
- PATCH =
'PATCH'.freeze
Class Method Summary collapse
-
.is_delete?(method) ⇒ Boolean
Is the method a DELETE?.
-
.is_get?(method) ⇒ Boolean
Is the method a GET?.
-
.is_patch?(method) ⇒ Boolean
Is the method a PATCH?.
-
.is_post?(method) ⇒ Boolean
Is the method a POST?.
-
.is_put?(method) ⇒ Boolean
Is the method a PUT?.
Class Method Details
.is_delete?(method) ⇒ Boolean
Is the method a DELETE?
47 48 49 |
# File 'lib/web_svr/web_method.rb', line 47 def self.is_delete?( method ) return method.upcase == DELETE end |
.is_get?(method) ⇒ Boolean
Is the method a GET?
19 20 21 |
# File 'lib/web_svr/web_method.rb', line 19 def self.is_get?( method ) return method.upcase == GET end |
.is_patch?(method) ⇒ Boolean
Is the method a PATCH?
40 41 42 |
# File 'lib/web_svr/web_method.rb', line 40 def self.is_patch?( method ) return method.upcase == PATCH end |
.is_post?(method) ⇒ Boolean
Is the method a POST?
26 27 28 |
# File 'lib/web_svr/web_method.rb', line 26 def self.is_post?( method ) return method.upcase == POST end |
.is_put?(method) ⇒ Boolean
Is the method a PUT?
33 34 35 |
# File 'lib/web_svr/web_method.rb', line 33 def self.is_put?( method ) return method.upcase == PUT end |