Class: PecRuby::SimpleMailAttachment
- Inherits:
-
Object
- Object
- PecRuby::SimpleMailAttachment
- Defined in:
- lib/pec_ruby/attachment.rb
Overview
Simple wrapper for mail attachments that mimics Mail::Attachment interface
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#mail ⇒ Object
readonly
Returns the value of attribute mail.
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
Instance Method Summary collapse
- #decoded ⇒ Object
-
#initialize(mail, filename, mime_type) ⇒ SimpleMailAttachment
constructor
A new instance of SimpleMailAttachment.
Constructor Details
#initialize(mail, filename, mime_type) ⇒ SimpleMailAttachment
Returns a new instance of SimpleMailAttachment.
205 206 207 208 209 |
# File 'lib/pec_ruby/attachment.rb', line 205 def initialize(mail, filename, mime_type) @mail = mail @filename = filename @mime_type = mime_type end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
203 204 205 |
# File 'lib/pec_ruby/attachment.rb', line 203 def filename @filename end |
#mail ⇒ Object (readonly)
Returns the value of attribute mail.
203 204 205 |
# File 'lib/pec_ruby/attachment.rb', line 203 def mail @mail end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
203 204 205 |
# File 'lib/pec_ruby/attachment.rb', line 203 def mime_type @mime_type end |
Instance Method Details
#decoded ⇒ Object
211 212 213 |
# File 'lib/pec_ruby/attachment.rb', line 211 def decoded @mail.to_s end |