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

Methods
C
D
E
H
O
R
S
Classes and Modules
Class Public methods
configures(*args, &block)

Deprecated. Use: configure

     # File lib/sinatra/compat.rb, line 176
176:       def configures(*args, &block)
177:         sinatra_warn "The 'configures' method is deprecated; use 'configure' instead."
178:         configure(*args, &block)
179:       end
default_options()

Deprecated. Use: set

     # File lib/sinatra/compat.rb, line 182
182:       def default_options
183:         sinatra_warn "Sinatra::Application.default_options is deprecated; use 'set' instead."
184:         fake = lambda { |options| set(options) }
185:         def fake.merge!(options) ; call(options) ; end
186:         fake
187:       end
env()

Deprecated. Use: options.environment

     # File lib/sinatra/compat.rb, line 207
207:       def env
208:         sinatra_warn "The :env option is deprecated; use :environment instead."
209:         environment
210:       end
env=(value)

Deprecated. Use: set :environment, ENV

     # File lib/sinatra/compat.rb, line 201
201:       def env=(value)
202:         sinatra_warn "The :env option is deprecated; use :environment instead."
203:         set :environment, value
204:       end
options()

Deprecated. Options are stored directly on the class object.

     # File lib/sinatra/compat.rb, line 170
170:       def options
171:         sinatra_warn "The 'options' class method is deprecated; use 'self' instead."
172:         Options.new(self)
173:       end
set_option(*args, &block)

Deprecated. Use: set

     # File lib/sinatra/compat.rb, line 190
190:       def  set_optionset_option(*args, &block)
191:         sinatra_warn "The 'set_option' method is deprecated; use 'set' instead."
192:         set(*args, &block)
193:       end
set_options(*args, &block)
     # File lib/sinatra/compat.rb, line 195
195:       def set_options(*args, &block)
196:         sinatra_warn "The 'set_options' method is deprecated; use 'set' instead."
197:         set(*args, &block)
198:       end
Instance Public methods
entity_tag(*args, &block)

Deprecated. Use: etag

     # 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
header(header=nil)

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

    # 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
render(engine, template, options={}, locals={}, &bk)

The :views_directory, :options, :haml, and :sass options are deprecated.

     # File lib/sinatra/compat.rb, line 119
119:     def render(engine, template, options={}, locals={}, &bk)
120:       if options.key?(:views_directory)
121:         sinatra_warn "The :views_directory option is deprecated; use :views instead."
122:         options[:views] = options.delete(:views_directory)
123:       end
124:       [:options, engine.to_sym].each do |key|
125:         if options.key?(key)
126:           sinatra_warn "Passing :#{key} => {} to #{engine} is deprecated; " +
127:                        "merge options directly into hash instead."
128:           options.merge! options.delete(key)
129:         end
130:       end
131:       super(engine, template, options, locals, &bk)
132:     end
send_data(data, options={})

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

     # 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
stop(*args, &block)

Deprecated. Use: halt

    # 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