class Friendly::MIME
Constants
- VERSION
Attributes
mimes[RW]
Public Class Methods
find(mime)
click to toggle source
load()
click to toggle source
Loads all mime names and extensions to a memory
# File lib/friendly_mime.rb, line 12 def load self.mimes = {} CSV.foreach(File.expand_path(File.join(File.dirname(__FILE__), '..', 'mimes.csv')), :headers => false) do |row| self.mimes[row[0]] = row[1] self.mimes[row[2]] = row[1] end end