Sha256: 6d628682da1592aa4d31794909671026cef446db1ed63b5a197b9ba59c4a62ab
Contents?: true
Size: 704 Bytes
Versions: 94
Compression:
Stored size: 704 Bytes
Contents
# encoding: utf-8 module Mail class ContentDispositionElement # :nodoc: include Mail::Utilities def initialize( string ) parser = Mail::ContentDispositionParser.new if tree = parser.parse(cleaned(string)) @disposition_type = tree.disposition_type.text_value @parameters = tree.parameters else raise Mail::Field::ParseError, "ContentDispositionElement can not parse |#{string}|\nReason was: #{parser.failure_reason}\n" end end def disposition_type @disposition_type end def parameters @parameters end def cleaned(string) string =~ /(.+);\s*$/ ? $1 : string end end end
Version data entries
94 entries across 64 versions & 4 rubygems