Method: Sinatra::Base.new

Defined in:
lib/sinatra/base.rb

.new(*args, &block) ⇒ Object

Create a new instance of the class fronted by its middleware pipeline. The object is guaranteed to respond to #call but may not be an instance of the class new was called on.



1664
1665
1666
1667
# File 'lib/sinatra/base.rb', line 1664

def new(*args, &block)
  instance = new!(*args, &block)
  Wrapper.new(build(instance).to_app, instance)
end