Returns the content-disposition of the mail object, returns nil or the passed default value if given
Example:
mail = TMail::Mail.load("path_to/raw_mail_with_attachment") mail.disposition #=> "attachment" mail = TMail::Mail.load("path_to/plain_simple_email") mail.disposition #=> nil mail.disposition(false) #=> false
Source Code
# File action_mailer/vendor/tmail-1.2.2/tmail/interface.rb, line 918 def disposition( default = nil ) if h = @header['content-disposition'] h.disposition || default else default end end
<code/>and<pre/>for code samples.