Sha256: 4c9e5c32e254ea02890dcbee601eef51a04bbd13dbc9a5a015bc916b1e50115a
Contents?: true
Size: 573 Bytes
Versions: 16
Compression:
Stored size: 573 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true require 'mail/parsers/content_type_parser' module Mail class ContentTypeElement #:nodoc: attr_reader :main_type, :sub_type, :parameters def initialize(string) content_type = Mail::Parsers::ContentTypeParser.parse(cleaned(string)) @main_type = content_type.main_type @sub_type = content_type.sub_type @parameters = content_type.parameters end private def cleaned(string) if string =~ /;\s*$/ $` else string end end end end
Version data entries
16 entries across 15 versions & 6 rubygems