class Sinatra::Base

def route!(base = settings, pass_block = nil)

Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
  if routes = base.routes[@request.request_method]
    routes.each do |pattern, conditions, block|
      returned_pass_block = process_route(pattern, conditions) do |*args|
        env['sinatra.route'] = "#{@request.request_method} #{pattern}"
        route_eval { block[*args] }
      end
      # don't wipe out pass_block in superclass
      pass_block = returned_pass_block if returned_pass_block
    end
  end
  # Run routes defined in superclass.
  if base.superclass.respond_to?(:routes)
    return route!(base.superclass, pass_block)
  end
  route_eval(&pass_block) if pass_block
  route_missing
end