Module: Wants

Defined in:
lib/wants.rb,
lib/wants/mimeparse.rb,
lib/wants/match_result.rb,
lib/wants/validate_accepts_middleware.rb

Defined Under Namespace

Modules: MIMEParse Classes: MatchResult, TestMimeParsing, ValidateAcceptsMiddleware

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.mime_lookup_tableObject



9
10
11
12
13
14
15
16
# File 'lib/wants.rb', line 9

def mime_lookup_table
  @mime_lookup_table ||= begin
    require 'rack/mime'
    Rack::Mime::MIME_TYPES
  rescue LoadError
    {}
  end
end

Class Method Details

.new(env, mime_types) ⇒ Object



5
6
7
# File 'lib/wants.rb', line 5

def new(env, mime_types)
  MatchResult.new(env, mime_types)
end