Sha256: b2cccca7d22ab6ae58592f43a75d111a1e4d7b15b2ea4e6d4a33ce87e4aec246
Contents?: true
Size: 738 Bytes
Versions: 12
Compression:
Stored size: 738 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 to_s(*args) end def cleaned(string) string =~ /(.+);\s*$/ ? $1 : string end end end
Version data entries
12 entries across 12 versions & 1 rubygems