Class: FileMagic

Inherits:
Object
  • Object
show all
Defined in:
lib/attachments/filemagic.rb

Class Method Summary collapse

Class Method Details

.mime(filename) ⇒ Object



4
5
6
# File 'lib/attachments/filemagic.rb', line 4

def self.mime filename
  mime_type = `file --brief --mime-type #{filename}`.strip()
end