Class Grape::Middleware::Stack
In: lib/grape/middleware/stack.rb
Parent: Object

Class to handle the stack of middlewares based on ActionDispatch::MiddlewareStack It allows to insert and insert after

Methods

[]   assert_index   build   concat   each   insert   insert_after   insert_before   last   merge_with   new   size   use  

Included Modules

Enumerable

Classes and Modules

Class Grape::Middleware::Stack::Middleware

Attributes

middlewares  [RW] 
others  [RW] 

Public Class methods

Public Instance methods

@return [Rack::Builder] the builder object with our middlewares applied

@description Add middlewares with :use operation to the stack. Store others with :insert_* operation for later @param [Array] other_specs An array of middleware specifications (e.g. [[:use, klass], [:insert_before, *args]])

insert_before(index, *args, &block)

Alias for insert

Protected Instance methods

[Validate]