Class: Mailscope::Message::Attachment
- Inherits:
-
Struct
- Object
- Struct
- Mailscope::Message::Attachment
- Defined in:
- lib/mailscope/message.rb
Overview
rubocop:disable Lint/StructNewOverride -- size mirrors the metadata key
and these structs are plain value objects, never enumerated.
Instance Attribute Summary collapse
-
#cid ⇒ Object
Returns the value of attribute cid.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#id ⇒ Object
Returns the value of attribute id.
-
#inline ⇒ Object
Returns the value of attribute inline.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
Instance Attribute Details
#cid ⇒ Object
Returns the value of attribute cid
17 18 19 |
# File 'lib/mailscope/message.rb', line 17 def cid @cid end |
#content_type ⇒ Object
Returns the value of attribute content_type
17 18 19 |
# File 'lib/mailscope/message.rb', line 17 def content_type @content_type end |
#filename ⇒ Object
Returns the value of attribute filename
17 18 19 |
# File 'lib/mailscope/message.rb', line 17 def filename @filename end |
#id ⇒ Object
Returns the value of attribute id
17 18 19 |
# File 'lib/mailscope/message.rb', line 17 def id @id end |
#inline ⇒ Object
Returns the value of attribute inline
17 18 19 |
# File 'lib/mailscope/message.rb', line 17 def inline @inline end |
#size ⇒ Object
Returns the value of attribute size
17 18 19 |
# File 'lib/mailscope/message.rb', line 17 def size @size end |
Instance Method Details
#image? ⇒ Boolean
20 |
# File 'lib/mailscope/message.rb', line 20 def image? = content_type.to_s.start_with?('image/') |
#inline? ⇒ Boolean
18 |
# File 'lib/mailscope/message.rb', line 18 def inline? = !!inline |
#to_h ⇒ Object
22 |
# File 'lib/mailscope/message.rb', line 22 def to_h = { id:, filename:, content_type:, size:, cid:, inline: } |