Method: Sinatra::Base.build

Defined in:
lib/sinatra/base.rb

.build(app) ⇒ Object

Creates a Rack::Builder instance with all the middleware set up and the given +app+ as end point.



1672
1673
1674
1675
1676
1677
1678
# File 'lib/sinatra/base.rb', line 1672

def build(app)
  builder = Rack::Builder.new
  setup_default_middleware builder
  setup_middleware builder
  builder.run app
  builder
end