Module: MIME::Headers::MIME

Module | MIME::Headers::MIME
In: | lib/mime/headers/mime.rb

The RFC 2045 MIME message header fields.

### Methods

content_description= content_disposition= content_id= content_transfer_encoding= content_type= mime_version= set_content_disposition

### Attributes

content_description | [R] |
content_disposition | [R] |
content_id | [R] |
content_transfer_encoding | [R] |
content_type | [R] |
mime_version | [R] |

### Public Instance methods

content_description=(description)

Describes the content, which can be useful for non-MIME clients.

content_disposition=(disposition)

Specifies the disposition of the content relative to its enclosing message. Valid values for `disposition` are inline and attachment. Parameters can also be specified here; see the RFC for details.

RFC 2183 Communicating Presentation Information in Internet Messages.

content_id=(id)

Globally unique ID that identifies a top-level message or message entity. Content IDs can be used for referencing or caching purposes.

content_transfer_encoding=(encoding)

The mechanism used for encoding the top-level message content.

Common Encoding Mechanisms

1. 7bit
2. 8bit
3. binary
4. quoted-printable
5. base64

content_type=(type)

Specifies the media type and subtype of the content. `type` will have the form media-type/subtype.

Common Content Types

1. application/octet-stream
2. audio/mpeg
3. image/jpeg
4. text/plain
5. video/mpeg

mime_version=(version)

Currently only version 1.0 exists.

### Protected Instance methods

set_content_disposition(type, params = {})

`type` is the disposition type of either "inline" or "attachment". `params` is a Hash with zero or more of the following keys:

      * filename          => name of file
      * creation-date     => RFC2822 data-time
      * modification-date => RFC2822 data-time
      * read-date         => RFC2822 data-time
      * size              => file size in octets

The values for the *-date keys may use Time::rfc2822.

[Validate]