Class: Gloo::WebSvr::WebMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/gloo/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)


48
49
50
# File 'lib/gloo/web_svr/web_method.rb', line 48

def self.is_delete?( method )
  return method.upcase == DELETE
end

.is_get?(method) ⇒ Boolean

Is the method a GET?

Returns:

  • (Boolean)


20
21
22
# File 'lib/gloo/web_svr/web_method.rb', line 20

def self.is_get?( method )
  return method.upcase == GET
end

.is_patch?(method) ⇒ Boolean

Is the method a PATCH?

Returns:

  • (Boolean)


41
42
43
# File 'lib/gloo/web_svr/web_method.rb', line 41

def self.is_patch?( method )
  return method.upcase == PATCH
end

.is_post?(method) ⇒ Boolean

Is the method a POST?

Returns:

  • (Boolean)


27
28
29
# File 'lib/gloo/web_svr/web_method.rb', line 27

def self.is_post?( method )
  return method.upcase == POST
end

.is_put?(method) ⇒ Boolean

Is the method a PUT?

Returns:

  • (Boolean)


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

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