class Sinatra::Base

def reset!

current class (not routes/filters/... defined by its superclass).
Removes all routes, filters, middleware and extension hooks from the
def reset!
  @conditions     = []
  @routes         = {}
  @filters        = {:before => [], :after => []}
  @errors         = {}
  @middleware     = []
  @prototype      = nil
  @extensions     = []
  if superclass.respond_to?(:templates)
    @templates = Hash.new { |hash,key| superclass.templates[key] }
  else
    @templates = {}
  end
end