Module: Ramaze::Tool::MIME
- Defined in:
- lib/ramaze/tool/mime.rb
Overview
Responsible for lookup of MIME info for filetypes based on extension.
Class Method Summary collapse
-
.type_for(file) ⇒ Object
Get MIME-type for the given filename based on extension.
Class Method Details
.type_for(file) ⇒ Object
Get MIME-type for the given filename based on extension. Answers with an empty string if none is found.
18 19 20 21 |
# File 'lib/ramaze/tool/mime.rb', line 18 def type_for file ext = File.extname(file) trait[:types][ext].to_s end |