Method: Convertible::MimeTypes.of

Defined in:
lib/convertible/mime_types.rb

.of(name) ⇒ Object

input is filename



46
47
48
49
50
# File 'lib/convertible/mime_types.rb', line 46

def self.of(name)
  if name && m = name.to_s.match(/(^|\.)([^\.]+)$/)
    EXTENSIONS[m[2].downcase]
  end
end