class Sinatra::Base

def before(path = nil, &block)

response.
context as route handlers and may access/modify the request and
Define a before filter; runs before all requests within the same
def before(path = nil, &block)
  add_filter(:before, path, &block)
end