Method: Sinatra::Base.before

Defined in:
lib/sinatra/base.rb

.before(path = /.*/, **options, &block) ⇒ Object

Define a before filter; runs before all requests within the same context as route handlers and may access/modify the request and response.



1488
1489
1490
# File 'lib/sinatra/base.rb', line 1488

def before(path = /.*/, **options, &block)
  add_filter(:before, path, **options, &block)
end