Class: Grape::Router::GreedyRoute

Inherits:
BaseRoute
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/grape/router/greedy_route.rb

Instance Attribute Summary collapse

Attributes inherited from BaseRoute

#options, #pattern

Instance Method Summary collapse

Methods inherited from BaseRoute

#namespace, #pattern_regexp, #regexp_capture_index, #to_regexp

Constructor Details

#initialize(pattern, endpoint:, allow_header:) ⇒ GreedyRoute

Returns a new instance of GreedyRoute.



15
16
17
18
19
# File 'lib/grape/router/greedy_route.rb', line 15

def initialize(pattern, endpoint:, allow_header:)
  super(pattern)
  @endpoint = endpoint
  @allow_header = allow_header
end

Instance Attribute Details

#allow_headerObject (readonly)

Returns the value of attribute allow_header.



13
14
15
# File 'lib/grape/router/greedy_route.rb', line 13

def allow_header
  @allow_header
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



13
14
15
# File 'lib/grape/router/greedy_route.rb', line 13

def endpoint
  @endpoint
end

Instance Method Details

#params(_input = nil) ⇒ Object



21
22
23
# File 'lib/grape/router/greedy_route.rb', line 21

def params(_input = nil)
  nil
end