Sha256: f2b4070948006abd5351f9856750ecb1ccf8004c0362f8b189b6a56b9306748c

Contents?: true

Size: 420 Bytes

Versions: 5

Compression:

Stored size: 420 Bytes

Contents

# frozen_string_literal: true

# Act like a Grape::Router::Route but for greedy_match
# see @neutral_map

module Grape
  class Router
    class GreedyRoute < BaseRoute
      def initialize(pattern:, **options)
        @pattern = pattern
        super(**options)
      end

      # Grape::Router:Route defines params as a function
      def params(_input = nil)
        options[:params] || {}
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
grape-2.2.0 lib/grape/router/greedy_route.rb
grape-2.1.3 lib/grape/router/greedy_route.rb
grape-2.1.2 lib/grape/router/greedy_route.rb
grape-2.1.1 lib/grape/router/greedy_route.rb
grape-2.1.0 lib/grape/router/greedy_route.rb