Sha256: 0295bba64379fd783027b83d994d92035cad7b3669582b3df949bc487e06cefe

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

module Adapters

  #
  #
  module Rack
  
    class LiveParameters < Base

      def initialize live_parameters
        @live_parameters = live_parameters
      end
    
      #
      #
      def to_app options = {}
        # For capturing by the lambda block.
        #
        live_parameters = @live_parameters
      
        lambda do |env|
          params = ::Rack::Request.new(env).params
        
          results = live_parameters.parameters params
        
          respond_with results.to_json
        end
      end
    
    end
  
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picky-2.7.0 lib/picky/adapters/rack/live_parameters.rb
picky-2.6.0 lib/picky/adapters/rack/live_parameters.rb