Class: MIME::TextMedia

Inherits:
DiscreteMediaType show all
Defined in:
lib/mime/discrete_media_type.rb

Overview

TextMedia is intended for content which is principally textual in form.

Instance Attribute Summary

Attributes inherited from MediaType

#headers

Attributes included from Headers::MIME

#content_description, #content_disposition, #content_id, #content_transfer_encoding, #content_type, #mime_version

Instance Method Summary collapse

Methods inherited from MediaType

#to_s

Constructor Details

#initialize(body, content_type = 'text/plain; charset=us-ascii') ⇒ TextMedia

Return a new TextMedia object containing body with the content type of content_type.

To specify the character set of body, a charset parameter may be appended to content_type using a semi-colon delimiter.



62
63
64
# File 'lib/mime/discrete_media_type.rb', line 62

def initialize body, content_type = 'text/plain; charset=us-ascii'
  super
end