Class: Request::Method

Inherits:
Object
  • Object
show all
Includes:
Adamantium
Defined in:
lib/request/method.rb

Overview

The request method of a request

Constant Summary collapse

ALL =
[]
INDEX =
ALL.each_with_object({}) do |method, index|
  index[method.verb]=method
end.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#verbString (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return verb

Returns:

  • (String)


22
23
24
# File 'lib/request/method.rb', line 22

def verb
  @verb
end

Class Method Details

.get(verb) ⇒ Method

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return request method

Parameters:

  • verb (String)

Returns:



36
37
38
# File 'lib/request/method.rb', line 36

def self.get(verb)
  INDEX.fetch(verb)
end