Include the helper modules provided in Sinatra‘s request context.
[Source]
# File lib/sinatra/base.rb, line 1354 1354: def self.helpers(*extensions, &block) 1355: Application.helpers(*extensions, &block) 1356: end
Create a new Sinatra application. The block is evaluated in the new app‘s class scope.
# File lib/sinatra/base.rb, line 1342 1342: def self.new(base=Base, options={}, &block) 1343: base = Class.new(base) 1344: base.class_eval(&block) if block_given? 1345: base 1346: end
Extend the top-level DSL with the modules provided.
# File lib/sinatra/base.rb, line 1349 1349: def self.register(*extensions, &block) 1350: Application.register(*extensions, &block) 1351: end
[Validate]