class Sinatra::Base
def before(path = nil, options = {}, &block)
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, options = {}, &block) add_filter(:before, path, options, &block) end