Class: TempmailSdk::EmailAttachment
- Inherits:
-
Object
- Object
- TempmailSdk::EmailAttachment
- Defined in:
- lib/tempmail_sdk/types.rb
Overview
邮件附件信息
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#size ⇒ Object
Returns the value of attribute size.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(filename: "", size: nil, content_type: nil, url: nil) ⇒ EmailAttachment
constructor
A new instance of EmailAttachment.
- #to_h ⇒ Object
Constructor Details
#initialize(filename: "", size: nil, content_type: nil, url: nil) ⇒ EmailAttachment
Returns a new instance of EmailAttachment.
50 51 52 53 54 55 |
# File 'lib/tempmail_sdk/types.rb', line 50 def initialize(filename: "", size: nil, content_type: nil, url: nil) @filename = filename @size = size @content_type = content_type @url = url end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
48 49 50 |
# File 'lib/tempmail_sdk/types.rb', line 48 def content_type @content_type end |
#filename ⇒ Object
Returns the value of attribute filename.
48 49 50 |
# File 'lib/tempmail_sdk/types.rb', line 48 def filename @filename end |
#size ⇒ Object
Returns the value of attribute size.
48 49 50 |
# File 'lib/tempmail_sdk/types.rb', line 48 def size @size end |
#url ⇒ Object
Returns the value of attribute url.
48 49 50 |
# File 'lib/tempmail_sdk/types.rb', line 48 def url @url end |
Instance Method Details
#to_h ⇒ Object
57 58 59 |
# File 'lib/tempmail_sdk/types.rb', line 57 def to_h { filename: @filename, size: @size, content_type: @content_type, url: @url } end |