Sha256: 323d169a85971019813baf3f186574b0af2fec2ccd9ffc040725e7cd93010dc9
Contents?: true
Size: 587 Bytes
Versions: 16
Compression:
Stored size: 587 Bytes
Contents
# encoding: utf-8 module Mail class ContentTypeElement # :nodoc: include Mail::Utilities def initialize( string ) content_type = Mail::Parsers::ContentTypeParser.new.parse(cleaned(string)) @main_type = content_type.main_type @sub_type = content_type.sub_type @parameters = content_type.parameters end def main_type @main_type end def sub_type @sub_type end def parameters @parameters end def cleaned(string) string =~ /(.+);\s*$/ ? $1 : string end end end
Version data entries
16 entries across 15 versions & 7 rubygems