Module: Phaxio::MimeTypeHelper Private
- Defined in:
- lib/phaxio/helpers/mime_type_helper.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
Class Method Details
.extension_for_mimetype(mimetype) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 |
# File 'lib/phaxio/helpers/mime_type_helper.rb', line 5 def extension_for_mimetype mimetype MIME::Types[mimetype].first.extensions.first end |
.mimetype_for_file(file_path) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/phaxio/helpers/mime_type_helper.rb', line 9 def mimetype_for_file file_path MIME::Types.of(file_path).first.content_type end |