Class: Mountapi::Route::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/mountapi/route/method.rb

Instance Method Summary collapse

Constructor Details

#initialize(method) ⇒ Method

Returns a new instance of Method.



4
5
6
# File 'lib/mountapi/route/method.rb', line 4

def initialize(method)
  @http_method = method.downcase.to_sym
end

Instance Method Details

#match?(meth) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/mountapi/route/method.rb', line 16

def match?(meth)
  meth.downcase.to_sym == @http_method
end

#raw_valueObject



12
13
14
# File 'lib/mountapi/route/method.rb', line 12

def raw_value
  @http_method
end

#to_symObject



8
9
10
# File 'lib/mountapi/route/method.rb', line 8

def to_sym
  raw_value
end