Class: Rack::File

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/compat.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.const_missing(const_name) ⇒ Object



39
40
41
42
43
44
45
46
47
48
# File 'lib/sinatra/compat.rb', line 39

def self.const_missing(const_name)
  if const_name == :MIME_TYPES
    hash = Hash.new { |hash,key| Rack::Mime::MIME_TYPES[".#{key}"] }
    const_set :MIME_TYPES, hash
    sinatra_warn 'Rack::File::MIME_TYPES is deprecated; use Rack::Mime instead.'
    hash
  else
    super
  end
end