Class: Protege::Gateway::Mail::Attachment
- Inherits:
-
Data
- Object
- Data
- Protege::Gateway::Mail::Attachment
- Defined in:
- lib/protege/gateway/mail/attachment.rb
Overview
Value object for a file as a mail attachment — the typed payload Outbound turns into a MIME
part. It is the one shape the send path speaks: a filename, a content type, and the raw bytes on
the wire. Both a reattached stored file (+Protege::StoredFile#to_mail_attachment+) and any
freshly produced bytes become one of these, so the payload is defined in a single place rather
than passed around as an anonymous Hash (mirroring how ::Mail is confined to Outbound).
These bytes are for transport only; the file's durable identity remains its blob, which the outbound message attaches by reference on persistence.
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Attribute Details
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes
14 15 16 |
# File 'lib/protege/gateway/mail/attachment.rb', line 14 def bytes @bytes end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type
14 15 16 |
# File 'lib/protege/gateway/mail/attachment.rb', line 14 def content_type @content_type end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename
14 15 16 |
# File 'lib/protege/gateway/mail/attachment.rb', line 14 def filename @filename end |