class Athena::MIME::Part::Data
inherits Athena::MIME::Part::Text
#
Represents attached/embedded content within the MIME message.
Direct known subclasses
Athena::MIME::Part::Message
Constructors#
.from_path(path : String | Path, name : String | Nil = nil, content_type : String | Nil = nil) : self
#
Creates the part using the contents the file at the provided path as the body, optionally with the provided name and content_type. The file is lazily read.
.new(body : String | IO | AMIME::Part::File, filename : String | Nil = nil, content_type : String | Nil = nil, encoding : String | Nil = nil)
#
Methods#
#as_inline : self
#
Marks this part as representing embedded content versus an attached file.
#content_id : String
#
Returns the content ID of this part, generating a unique one if one was not already set.
#content_id=(id : String) : self
#
Sets the content ID of this part to the provided id.
#content_type : String
#
Returns the content type of this part.
#filename : String | ::Nil
#
Returns the name of the file associated with this part.
#has_content_id? : Bool
#
Returns true
if this part has a #content_id
currently set.
#media_type : String
#
Returns the media type of this part based on its body.
#prepared_headers : AMIME::Header::Collection
#
Returns a cloned AMIME::Header::Collection
consisting of a final representation of the headers associated with this message.
I.e. Ensures the message's headers include the required ones.