Class: Mountapi::Route::Method
- Inherits:
-
Object
- Object
- Mountapi::Route::Method
- Defined in:
- lib/mountapi/route/method.rb
Instance Method Summary collapse
-
#initialize(method) ⇒ Method
constructor
A new instance of Method.
- #match?(meth) ⇒ Boolean
- #raw_value ⇒ Object
- #to_sym ⇒ Object
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
16 17 18 |
# File 'lib/mountapi/route/method.rb', line 16 def match?(meth) meth.downcase.to_sym == @http_method end |
#raw_value ⇒ Object
12 13 14 |
# File 'lib/mountapi/route/method.rb', line 12 def raw_value @http_method end |
#to_sym ⇒ Object
8 9 10 |
# File 'lib/mountapi/route/method.rb', line 8 def to_sym raw_value end |