Sha256: fd3cb829c66617348d05c8b2c1440a7cc615da30ce528359e34dc6a32e5c96bb

Contents?: true

Size: 810 Bytes

Versions: 5

Compression:

Stored size: 810 Bytes

Contents

class Usher
  module Interface
    class Rack
      # Middleware for using Usher's rack interface to recognize the request, then, pass on to the next application.
      # Values are stored in `env` normally. The details of that storage is in the Rack interface itself.
      # @see Usher::Interface::Rack
      class Middleware
        
        # @param app [#call] Application to call next
        # @param router [Usher::Interface::Rack] The router call first before calling the next application
        def initialize(app, router)
          @app = app
          @router = router
        end

        # @param env [Hash] The environment hash
        # @return [#each] The application's return
        def call(env)
          @router.call(env)
          @app.call(env)
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
usher-0.8.3 lib/usher/interface/rack/middleware.rb
usher-0.8.2 lib/usher/interface/rack/middleware.rb
usher-0.8.1 lib/usher/interface/rack/middleware.rb
usher-0.8.0 lib/usher/interface/rack/middleware.rb
usher-0.7.5 lib/usher/interface/rack/middleware.rb