Sha256: 88f6da118f00583e6a7819cc75ae338d296beee9ffe00077f506cac2ef3dba3b

Contents?: true

Size: 492 Bytes

Versions: 125

Compression:

Stored size: 492 Bytes

Contents

module Acfs
  module Middleware

    # A base middleware that does not modify request or response.
    # Can be used as super class for custom middleware implementations.
    #
    class Base
      attr_reader :app, :options

      def initialize(app, options = {})
        @app     = app
        @options = options
      end

      def call(request)
        request.on_complete { |res, nxt| response(res, nxt) } if respond_to? :response
        app.call(request)
      end
    end
  end
end

Version data entries

125 entries across 125 versions & 1 rubygems

Version Path
acfs-0.25.0.1.b232 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b229 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b228 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b227 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b226 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b225 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b223 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b221 lib/acfs/middleware/base.rb
acfs-0.25.0.1.b217 lib/acfs/middleware/base.rb
acfs-0.25.0 lib/acfs/middleware/base.rb
acfs-0.24.0.1.b216 lib/acfs/middleware/base.rb
acfs-0.24.0.1.b214 lib/acfs/middleware/base.rb
acfs-0.24.0.1.b212 lib/acfs/middleware/base.rb
acfs-0.24.0.b210 lib/acfs/middleware/base.rb
acfs-0.24.0 lib/acfs/middleware/base.rb
acfs-0.23.2.b209 lib/acfs/middleware/base.rb
acfs-0.23.2.b208 lib/acfs/middleware/base.rb
acfs-0.23.2.b206 lib/acfs/middleware/base.rb
acfs-0.23.2.b205 lib/acfs/middleware/base.rb
acfs-0.23.2.b204 lib/acfs/middleware/base.rb