Sha256: 120ec94a230fb5d43257ecf505d01c8fc0233a46b9617a3219c78a651474d2dd

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

require "rack/bug/params_signature"

module Rack
  module Bug
    
    class PanelApp
      include Rack::Bug::Render
      
      attr_reader :request
      
      def call(env)
        @request = Rack::Request.new(env)
        dispatch
      end
      
      def render_template(*args)
        Rack::Response.new([super]).to_a
      end
      
      def params
        @request.GET
      end

      def not_found
        [404, {}, []]
      end

      def validate_params
        ParamsSignature.new(request).validate!
      end
      
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
perfectline-rack-bug-0.1.1 lib/rack/bug/panel_app.rb