Class: ReeSwagger::GetMimeType

Inherits:
Object
  • Object
show all
Includes:
Ree::FnDSL
Defined in:
lib/ree_lib/packages/ree_swagger/package/ree_swagger/functions/get_mime_type.rb

Constant Summary collapse

MIME_TYPES =
{
  :html => "text/html", 
  :text => "text/plain", 
  :js => "text/javascript", 
  :css => "text/css", 
  :ics => "text/calendar", 
  :csv => "text/csv", 
  :vcf => "text/vcard", 
  :vtt => "text/vtt", 
  :png => "image/png", 
  :jpeg => "image/jpeg", 
  :gif => "image/gif", 
  :bmp => "image/bmp", 
  :tiff => "image/tiff", 
  :svg => "image/svg+xml", 
  :mpeg => "video/mpeg", 
  :mp3 => "audio/mpeg", 
  :ogg => "audio/ogg", 
  :m4a => "audio/aac", 
  :webm => "video/webm", 
  :mp4 => "video/mp4", 
  :otf => "font/otf", 
  :ttf => "font/ttf", 
  :woff => "font/woff", 
  :woff2 => "font/woff2", 
  :xml => "application/xml", 
  :rss => "application/rss+xml", 
  :atom => "application/atom+xml", 
  :yaml => "application/x-yaml", 
  :multipart_form => "multipart/form-data", 
  :url_encoded_form => "application/x-www-form-urlencoded", 
  :json => "application/json", 
  :pdf => "application/pdf", 
  :zip => "application/zip", 
  :gzip => "application/gzip"
}.freeze

Instance Method Summary collapse

Instance Method Details

#call(type) ⇒ Object



46
47
48
# File 'lib/ree_lib/packages/ree_swagger/package/ree_swagger/functions/get_mime_type.rb', line 46

def call(type)
  MIME_TYPES.fetch(type)
end