Class: Sinatra::Application

Inherits:
Base
  • Object
show all
Defined in:
lib/sinatra/base.rb,
lib/sinatra/main.rb

Overview

The top-level Application. All DSL methods executed on main are delegated to this class.

Constant Summary

Constants inherited from Base

Base::CALLERS_TO_IGNORE

Instance Attribute Summary

Attributes inherited from Base

#app, #env, #params, #request, #response

Class Method Summary collapse

Methods inherited from Base

before, #call, call, #call!, caller_files, caller_locations, condition, configure, delete, development?, disable, enable, error, extensions, #forward, get, #halt, head, helpers, #initialize, layout, media_type, middleware, new, not_found, #options, #pass, post, production?, prototype, put, reset!, run!, set, template, test?, use, use_in_file_templates!

Methods included from Templates

#builder, #erb, #haml, #sass

Methods included from Helpers

#attachment, #back, #body, #content_type, #error, #etag, #headers, #last_modified, #media_type, #not_found, #redirect, #send_file, #session, #status

Constructor Details

This class inherits a constructor from Sinatra::Base

Class Method Details

.register(*extensions, &block) ⇒ Object

:nodoc:



1061
1062
1063
1064
1065
# File 'lib/sinatra/base.rb', line 1061

def self.register(*extensions, &block) #:nodoc:
  added_methods = extensions.map {|m| m.public_instance_methods }.flatten
  Delegator.delegate(*added_methods)
  super(*extensions, &block)
end