Class Sinatra::Default
In: lib/sinatra/base.rb
lib/sinatra/compat.rb
lib/sinatra/main.rb
Parent: Base

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

Methods

Public Class methods

Deprecated. Use: configure

[Source]

     # File lib/sinatra/compat.rb, line 160
160:       def configures(*args, &block)
161:         sinatra_warn "The 'configures' method is deprecated; use 'configure' instead."
162:         configure(*args, &block)
163:       end

Deprecated. Use: set

[Source]

     # File lib/sinatra/compat.rb, line 166
166:       def default_options
167:         sinatra_warn "Sinatra::Application.default_options is deprecated; use 'set' instead."
168:         fake = lambda { |options| set(options) }
169:         def fake.merge!(options) ; call(options) ; end
170:         fake
171:       end

Deprecated. Use: options.environment

[Source]

     # File lib/sinatra/compat.rb, line 191
191:       def env
192:         sinatra_warn "The :env option is deprecated; use :environment instead."
193:         environment
194:       end

Deprecated. Use: set :environment, ENV

[Source]

     # File lib/sinatra/compat.rb, line 185
185:       def env=(value)
186:         sinatra_warn "The :env option is deprecated; use :environment instead."
187:         set :environment, value
188:       end

Deprecated. Options are stored directly on the class object.

[Source]

     # File lib/sinatra/compat.rb, line 154
154:       def options
155:         sinatra_warn "The 'options' class method is deprecated; use 'self' instead."
156:         Options.new(self)
157:       end

Deprecated. Use: set

[Source]

     # File lib/sinatra/compat.rb, line 174
174:       def  set_optionset_option(*args, &block)
175:         sinatra_warn "The 'set_option' method is deprecated; use 'set' instead."
176:         set(*args, &block)
177:       end

[Source]

     # File lib/sinatra/compat.rb, line 179
179:       def set_options(*args, &block)
180:         sinatra_warn "The 'set_options' method is deprecated; use 'set' instead."
181:         set(*args, &block)
182:       end

Public Instance methods

Deprecated. Use: etag

[Source]

     # File lib/sinatra/compat.rb, line 102
102:     def entity_tag(*args, &block)
103:       sinatra_warn "The 'entity_tag' method is deprecated; use 'etag' instead."
104:       etag(*args, &block)
105:     end

Deprecated. Use: response[‘Header-Name’]

[Source]

    # File lib/sinatra/compat.rb, line 90
90:     def header(header=nil)
91:       sinatra_warn "The 'header' method is deprecated; use 'headers' instead."
92:       headers(header)
93:     end

Deprecated. Use the attachment helper and return the data as a String or Array.

[Source]

     # File lib/sinatra/compat.rb, line 109
109:     def send_data(data, options={})
110:       sinatra_warn "The 'send_data' method is deprecated. use attachment, status, content_type, etc. helpers instead."
111: 
112:       status       options[:status]   if options[:status]
113:       attachment   options[:filename] if options[:disposition] == 'attachment'
114:       content_type options[:type]     if options[:type]
115:       halt data
116:     end

Deprecated. Use: halt

[Source]

    # File lib/sinatra/compat.rb, line 96
96:     def stop(*args, &block)
97:       sinatra_warn "The 'stop' method is deprecated; use 'halt' instead."
98:       halt(*args, &block)
99:     end

[Validate]