Method: Flatrack#use

Defined in:
lib/flatrack.rb

#use(middleware, options = nil) ⇒ Object

Insert a rack middleware at the end of the stack

Parameters:

  • middleware (Class)

    the middleware class

  • options (Hash) (defaults to: nil)

    the options for the middleware



165
166
167
# File 'lib/flatrack.rb', line 165

def use(middleware, options = nil)
  self.middleware << [middleware, options].compact
end