Class: Pdm::Attachment
- Inherits:
-
Object
- Object
- Pdm::Attachment
- Defined in:
- lib/pdm/attachment.rb
Instance Attribute Summary collapse
-
#eof ⇒ Object
Returns the value of attribute eof.
-
#mail_attachment ⇒ Object
Returns the value of attribute mail_attachment.
Instance Method Summary collapse
- #eof? ⇒ Boolean
-
#initialize(mail_attachment) ⇒ Attachment
constructor
A new instance of Attachment.
- #path ⇒ Object
- #read(bytes) ⇒ Object
Constructor Details
#initialize(mail_attachment) ⇒ Attachment
7 8 9 10 |
# File 'lib/pdm/attachment.rb', line 7 def initialize() self. = self.eof = false end |
Instance Attribute Details
#eof ⇒ Object
Returns the value of attribute eof.
5 6 7 |
# File 'lib/pdm/attachment.rb', line 5 def eof @eof end |
#mail_attachment ⇒ Object
Returns the value of attribute mail_attachment.
4 5 6 |
# File 'lib/pdm/attachment.rb', line 4 def end |
Instance Method Details
#eof? ⇒ Boolean
13 14 15 |
# File 'lib/pdm/attachment.rb', line 13 def eof? self.eof == true end |
#path ⇒ Object
26 27 28 |
# File 'lib/pdm/attachment.rb', line 26 def path .filename end |
#read(bytes) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/pdm/attachment.rb', line 17 def read(bytes) if eof? nil else self.eof = true .read end end |