Method: Cynq::Directory#content_type_for_key
- Defined in:
- lib/cynq/directory.rb
#content_type_for_key(key) ⇒ Object
63 64 65 66 |
# File 'lib/cynq/directory.rb', line 63 def content_type_for_key(key) types = MIME::Types.type_for(File.extname(key)) types.empty? ? nil : types.first.to_s end |