Sha256: 5ac46c096a55d274e0f819d10bc826e16ff9cd90dffa0ae2300d5ca9bddcdb59

Contents?: true

Size: 297 Bytes

Versions: 6

Compression:

Stored size: 297 Bytes

Contents

module Phaxio
  # @api private
  module MimeTypeHelper
    class << self
      def extension_for_mimetype mimetype
        MIME::Types[mimetype].first.extensions.first
      end

      def mimetype_for_file file_path
        MIME::Types.of(file_path).first.content_type
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
phaxio-2.1.2 lib/phaxio/helpers/mime_type_helper.rb
phaxio-2.1.1 lib/phaxio/helpers/mime_type_helper.rb
phaxio-2.1.0 lib/phaxio/helpers/mime_type_helper.rb
phaxio-2.1.0.pre lib/phaxio/helpers/mime_type_helper.rb
phaxio-2.0.1 lib/phaxio/helpers/mime_type_helper.rb
phaxio-2.0.0 lib/phaxio/helpers/mime_type_helper.rb