Method: Marcel::Magic.by_magic

Defined in:
lib/marcel/magic.rb

.by_magic(io) ⇒ Object

Lookup mime type by magic content analysis. This is a slow operation.



86
87
88
89
# File 'lib/marcel/magic.rb', line 86

def self.by_magic(io)
  mime = magic_match(io, :find)
  mime && new(mime[0])
end