Class: R2OAS::Routing::VerbComponent
- Inherits:
-
BaseComponent
- Object
- Base
- Base
- BaseComponent
- R2OAS::Routing::VerbComponent
- Defined in:
- lib/r2-oas/routing/components/verb_component.rb
Instance Method Summary collapse
-
#initialize(verb) ⇒ VerbComponent
constructor
A new instance of VerbComponent.
-
#verbs ⇒ Object
e.x.) “” => [“get”] e.x.) “POST” => [“post”] e.x.) “GET|POST” => [“get”,“post”].
Constructor Details
#initialize(verb) ⇒ VerbComponent
Returns a new instance of VerbComponent.
8 9 10 11 |
# File 'lib/r2-oas/routing/components/verb_component.rb', line 8 def initialize(verb) super() @verb = verb end |
Instance Method Details
#verbs ⇒ Object
e.x.) “” => [“get”] e.x.) “POST” => [“post”] e.x.) “GET|POST” => [“get”,“post”]
16 17 18 |
# File 'lib/r2-oas/routing/components/verb_component.rb', line 16 def verbs (@verb.downcase.presence || 'get').split('|') end |