Class: WebSvr::WebMethod

Inherits:
Object
  • Object
show all
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

Class Method Details

.is_delete?(method) ⇒ Boolean

Is the method a DELETE?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


33
34
35
# File 'lib/web_svr/web_method.rb', line 33

def self.is_put?( method )
  return method.upcase == PUT
end