module Sinatra

def self.new(base = Base, &block)

Create a new Sinatra application; the block is evaluated in the class scope.
def self.new(base = Base, &block)
  base = Class.new(base)
  base.class_eval(&block) if block_given?
  base
end