class Allure::ContentType

Commonly used mime type definitions

Constants

CSS
CSV
JPG
JSON
PNG
SVG
TSV
TXT
URI
WEBM
XML

Public Class Methods

to_extension(content_type) click to toggle source

Get file extension from mime type @param [String] content_type mime type @return [String] file extension

# File lib/allure_ruby_commons/model/content_type.rb, line 23
def self.to_extension(content_type)
  MIME::Types[content_type]&.first&.preferred_extension
end