Class: Sinatra::Application
- Defined in:
- lib/vendor/sinatra-1.4.4/lib/sinatra/base.rb,
lib/vendor/sinatra-1.4.4/lib/sinatra/main.rb
Overview
Execution context for classic style (top-level) applications. All DSL methods executed on main are delegated to this class.
The Application class should not be subclassed, unless you want to inherit all settings, routes, handlers, and error pages from the top-level. Subclassing Sinatra::Base is highly recommended for modular applications.
Constant Summary
Constants inherited from Base
Base::CALLERS_TO_IGNORE, Base::URI_INSTANCE
Constants included from Helpers
Constants included from Rack::Utils
Rack::Utils::DEFAULT_SEP, Rack::Utils::ESCAPE_HTML, Rack::Utils::ESCAPE_HTML_PATTERN, Rack::Utils::HTTP_STATUS_CODES, Rack::Utils::Multipart, Rack::Utils::STATUS_WITH_NO_ENTITY_BODY, Rack::Utils::SYMBOL_TO_STATUS_CODE
Instance Attribute Summary
Attributes inherited from Base
#app, #env, #params, #request, #response, #template_cache
Class Method Summary collapse
Methods inherited from Base
add_filter, after, before, build, #call, call, #call!, caller_files, caller_locations, condition, configure, delete, development?, disable, enable, error, extensions, #forward, get, #halt, head, helpers, #initialize, inline_templates=, layout, link, middleware, mime_type, mime_types, new, #new!, not_found, #options, options, #pass, patch, post, production?, prototype, public=, public_dir, public_dir=, put, quit!, reset!, run!, running?, set, settings, #settings, template, test?, unlink, use
Methods included from Templates
#builder, #coffee, #creole, #erb, #erubis, #find_template, #haml, #initialize, #less, #liquid, #markaby, #markdown, #nokogiri, #rabl, #radius, #rdoc, #sass, #scss, #slim, #stylus, #textile, #wlang, #yajl
Methods included from Helpers
#attachment, #back, #body, #cache_control, #client_error?, #content_type, #error, #etag, #expires, #headers, #informational?, #last_modified, #logger, #mime_type, #not_found, #not_found?, #redirect, #redirect?, #send_file, #server_error?, #session, #status, #stream, #success?, #time_for, #uri
Methods included from Rack::Utils
best_q_match, build_nested_query, build_query, byte_ranges, bytesize, delete_cookie_header!, escape, escape_html, escape_path, normalize_params, params_hash_type?, parse_nested_query, parse_query, q_values, rfc2109, rfc2822, secure_compare, select_best_encoding, set_cookie_header!, status_code, unescape
Constructor Details
This class inherits a constructor from Sinatra::Base
Class Method Details
.register(*extensions, &block) ⇒ Object
:nodoc:
1957 1958 1959 1960 1961 |
# File 'lib/vendor/sinatra-1.4.4/lib/sinatra/base.rb', line 1957 def self.register(*extensions, &block) #:nodoc: added_methods = extensions.map {|m| m.public_instance_methods }.flatten Delegator.delegate(*added_methods) super(*extensions, &block) end |