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