instance method body

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

body(to_charset = 'utf-8', &block)

No documentation comment.

Parameters

to_charset opt = 'utf-8'
block block
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb, line 36
    def body(to_charset = 'utf-8', &block)
      attachment_presenter = block || Proc.new { |file_name| "Attachment: #{file_name}\n" }

      if multipart?
        parts.collect { |part|
          header = part["content-type"]

          if part.multipart?
            part.body(to_charset, &attachment_presenter)
          elsif header.nil?
            ""
          elsif !attachment?(part)
            part.unquoted_body(to_charset)
          else
            attachment_presenter.call(header["name"] || "(unnamed)")
          end
        }.join
      else
        unquoted_body(to_charset)
      end
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb line 36 · 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