Class: MIME::Multipart::Alternative

Inherits:
MIME::Multipart show all
Defined in:
lib/mime/composite_media.rb

Overview

The Alternative subtype indicates that each contained entity is an alternatively formatted version of the same content.

In general, when composing multipart/alternative entities, add the body parts in increasing order of preference; that is, with the preferred format last. For example, to prioritize for fancy text, add the plainest format first and the richest format last. Typically, receiving user agents select the last format they are capable of displaying or interpreting.

Instance Attribute Summary

Attributes inherited from CompositeMedia

#boundary

Attributes inherited from MIME::Media

#body, #headers

Attributes included from Headers::MIME

#description, #disposition, #id, #mime_version, #transfer_encoding, #type

Instance Method Summary collapse

Methods inherited from CompositeMedia

#add, #attach, #inline

Methods inherited from MIME::Media

#to_s

Constructor Details

#initializeAlternative

Returns a Multipart::Alternative object with a content type of multipart/alternative.



160
161
162
# File 'lib/mime/composite_media.rb', line 160

def initialize
  super('alternative')
end