Method: Grape::Router::BaseRoute#to_regexp

Defined in:
lib/grape/router/base_route.rb

#to_regexp(index) ⇒ Object



24
25
26
27
# File 'lib/grape/router/base_route.rb', line 24

def to_regexp(index)
  @index = index
  Regexp.new("(?<#{regexp_capture_index}>#{pattern_regexp})")
end