class Roda::RodaPlugins::MiddlewareStack::StackPosition
middleware can be inserted.
Represents a specific position in the application’s middleware stack where new
def initialize(app, middleware, position)
def initialize(app, middleware, position) @app = app @middleware = middleware @position = position end
def use(*args, &block)
Increments the position so that calling this multiple times adds later
Insert a new middleware into the current position in the middleware stack.
def use(*args, &block) @middleware.insert(@position, [args, block]) @app.send(:build_rack_app) @position += 1 nil end