class Sinatra::Base

def route_eval(&block)

Run a route block and throw :halt with the result.
def route_eval(&block)
  throw :halt, instance_eval(&block)
end