Class: Sinatra::Default

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

Overview

Base class for classic style (top-level) applications.

Direct Known Subclasses

Application

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

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

Methods included from Templates

#builder, #erb, #erubis, #haml, #sass

Methods included from Helpers

#attachment, #back, #body, #cache_control, #content_type, #error, #etag, #expires, #headers, #last_modified, #mime_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:



1093
1094
1095
1096
1097
# File 'lib/sinatra/base.rb', line 1093

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