class Ramverk::Configuration::Middleware
Middleware
manager.
Attributes
stack[R]
Return all registered middleware in the stack.
@return [Array]
Public Class Methods
new()
click to toggle source
@private
# File lib/ramverk/configuration/middleware.rb, line 13 def initialize @stack = [] end
Public Instance Methods
append(middleware, *args, &block)
click to toggle source
Append a middleware to the stack.
@param middleware [Class] @param *args [*] @param &block [Proc]
# File lib/ramverk/configuration/middleware.rb, line 22 def append(middleware, *args, &block) @stack << [middleware, args, block].freeze end
Also aliased as: use
freeze()
click to toggle source
@private
Calls superclass method
# File lib/ramverk/configuration/middleware.rb, line 41 def freeze @stack.freeze super end
prepend(middleware, *args, &block)
click to toggle source
Prepend a middleware to the stack.
@param middleware [Class] @param *args [*] @param &block [Proc]
# File lib/ramverk/configuration/middleware.rb, line 32 def prepend(middleware, *args, &block) @stack.unshift [middleware, args, block].freeze end
run()
click to toggle source
# File lib/ramverk/configuration/middleware.rb, line 36 def run end