Sha256: 5974f00f6e2ca1a95d9b0fa34be682aec7075c1c0a30223b73c7d149562c8d2f

Contents?: true

Size: 664 Bytes

Versions: 7

Compression:

Stored size: 664 Bytes

Contents

# frozen_string_literal: true

module Grape
  module Extensions
    module Hashie
      module Mash
        module ParamBuilder
          extend ::ActiveSupport::Concern
          included do
            namespace_inheritable(:build_params_with, Grape::Extensions::Hashie::Mash::ParamBuilder)
          end

          def params_builder
            Grape::Extensions::Hashie::Mash::ParamBuilder
          end

          def build_params
            ::Hashie::Mash.new(rack_params).tap do |params|
              params.deep_merge!(grape_routing_args) if env.key?(Grape::Env::GRAPE_ROUTING_ARGS)
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
grape-2.2.0 lib/grape/extensions/hashie/mash.rb
grape-2.1.3 lib/grape/extensions/hashie/mash.rb
grape-2.1.2 lib/grape/extensions/hashie/mash.rb
grape-2.1.1 lib/grape/extensions/hashie/mash.rb
grape-2.1.0 lib/grape/extensions/hashie/mash.rb
grape-2.0.0 lib/grape/extensions/hashie/mash.rb
grape-1.8.0 lib/grape/extensions/hashie/mash.rb