instance method disposition

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

disposition( default = nil )

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

Parameters

default opt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb, line 923
    def disposition( default = nil )
      if h = @header['content-disposition']
        h.disposition || default
      else
        default
      end
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb line 923 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::Mail

Type at least 2 characters to search.

↑↓ navigate · open · esc close