Module: Rack::Chain::Linker

Defined in:
lib/rack/chain.rb

Overview

Include this module in Rack::Builder to make all apps use Rack::Chain.

Alternatively, extend Rack::Builder in config.ru to use Rack::Chain for that particular config.ru. Example:

<pre> require ‘rack/chain’ extend Rack::Chain::Linker use Middleware1 use Middleware2 run App </pre>

Instance Method Summary collapse

Instance Method Details

#to_appObject



48
49
50
51
52
# File 'lib/rack/chain.rb', line 48

def to_app
  app = @map ? generate_map(@run, @map) : @run
  fail "missing run or map statement" unless app
  Rack::Chain.new(app, @use)
end