Class: GmailSender::MessageStreamWriter
- Inherits:
-
Object
- Object
- GmailSender::MessageStreamWriter
- Defined in:
- lib/gmail_sender/message_stream_writer.rb
Constant Summary collapse
- ATTACHMENT_READ_PORTION =
you may change this, but must be multiply to 3
150360
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
Instance Method Summary collapse
-
#initialize(sender_email) ⇒ MessageStreamWriter
constructor
A new instance of MessageStreamWriter.
- #write(msg_stream, to, subject, content, content_type) ⇒ Object
Constructor Details
#initialize(sender_email) ⇒ MessageStreamWriter
Returns a new instance of MessageStreamWriter.
7 8 9 10 11 |
# File 'lib/gmail_sender/message_stream_writer.rb', line 7 def initialize(sender_email) @sender_email = sender_email = [] @boundary = rand(2**256).to_s(16) end |
Instance Attribute Details
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
5 6 7 |
# File 'lib/gmail_sender/message_stream_writer.rb', line 5 def end |
Instance Method Details
#write(msg_stream, to, subject, content, content_type) ⇒ Object
13 14 15 16 17 |
# File 'lib/gmail_sender/message_stream_writer.rb', line 13 def write(msg_stream, to, subject, content, content_type) write_headers(msg_stream, to, subject) write_content(msg_stream, content, content_type) (msg_stream) end |