Module: Sinatra
Constant Summary
-
PARAMS_CONFIG =
# File 'lib/sinatra/main.rb', line 4{}
-
VERSION =
# File 'lib/sinatra/version.rb', line 4'4.1.1'
Class Method Summary
-
.helpers(*extensions, &block)
Include the helper modules provided in Sinatra's request context.
-
.new(base = Base, &block)
Create a new
Sinatra
application; the block is evaluated in the class scope. -
.register(*extensions, &block)
Extend the top-level DSL with the modules provided.
-
.use(*args, &block)
Use the middleware for classic applications.
Class Method Details
.helpers(*extensions, &block)
Include the helper modules provided in Sinatra's request context.
.new(base = Base, &block)
Create a new Sinatra
application; the block is evaluated in the class scope.
# File 'lib/sinatra/base.rb', line 2147
def self.new(base = Base, &block) base = Class.new(base) base.class_eval(&block) if block_given? base end
.register(*extensions, &block)
Extend the top-level DSL with the modules provided.
.use(*args, &block)
Use the middleware for classic applications.