Class: Grape::Router::GreedyRoute
- Defined in:
- lib/grape/router/greedy_route.rb
Instance Attribute Summary
Attributes inherited from BaseRoute
Instance Method Summary collapse
-
#initialize(pattern:, **options) ⇒ GreedyRoute
constructor
A new instance of GreedyRoute.
-
#params(_input = nil) ⇒ Object
Grape::Router:Route defines params as a function.
Methods inherited from BaseRoute
#pattern_regexp, #regexp_capture_index, #to_regexp
Constructor Details
#initialize(pattern:, **options) ⇒ GreedyRoute
Returns a new instance of GreedyRoute.
9 10 11 12 |
# File 'lib/grape/router/greedy_route.rb', line 9 def initialize(pattern:, **) @pattern = pattern super(**) end |
Instance Method Details
#params(_input = nil) ⇒ Object
Grape::Router:Route defines params as a function
15 16 17 |
# File 'lib/grape/router/greedy_route.rb', line 15 def params(_input = nil) [:params] || {} end |