Class: Postpeek::Message
- Inherits:
-
Object
- Object
- Postpeek::Message
- Defined in:
- lib/postpeek/message.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
-
#html_body ⇒ Object
readonly
Returns the value of attribute html_body.
-
#mail ⇒ Object
readonly
Returns the value of attribute mail.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#text_body ⇒ Object
readonly
Returns the value of attribute text_body.
Instance Method Summary collapse
- #from ⇒ Object
- #id ⇒ Object
-
#initialize(mail:, metadata:, html_body: nil, text_body: nil, attachments: []) ⇒ Message
constructor
A new instance of Message.
- #mailer_action ⇒ Object
- #mailer_class ⇒ Object
- #raw_source ⇒ Object
- #subject ⇒ Object
- #to ⇒ Object
Constructor Details
#initialize(mail:, metadata:, html_body: nil, text_body: nil, attachments: []) ⇒ Message
Returns a new instance of Message.
10 11 12 13 14 15 16 |
# File 'lib/postpeek/message.rb', line 10 def initialize(mail:, metadata:, html_body: nil, text_body: nil, attachments: []) @mail = mail @metadata = @html_body = html_body @text_body = text_body @attachments = end |
Instance Attribute Details
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
18 19 20 |
# File 'lib/postpeek/message.rb', line 18 def @attachments end |
#html_body ⇒ Object (readonly)
Returns the value of attribute html_body.
18 19 20 |
# File 'lib/postpeek/message.rb', line 18 def html_body @html_body end |
#mail ⇒ Object (readonly)
Returns the value of attribute mail.
18 19 20 |
# File 'lib/postpeek/message.rb', line 18 def mail @mail end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
18 19 20 |
# File 'lib/postpeek/message.rb', line 18 def @metadata end |
#text_body ⇒ Object (readonly)
Returns the value of attribute text_body.
18 19 20 |
# File 'lib/postpeek/message.rb', line 18 def text_body @text_body end |
Instance Method Details
#from ⇒ Object
28 29 30 |
# File 'lib/postpeek/message.rb', line 28 def from [:from] end |
#id ⇒ Object
20 21 22 |
# File 'lib/postpeek/message.rb', line 20 def id [:id] end |
#mailer_action ⇒ Object
40 41 42 |
# File 'lib/postpeek/message.rb', line 40 def mailer_action [:mailer_action] end |
#mailer_class ⇒ Object
36 37 38 |
# File 'lib/postpeek/message.rb', line 36 def mailer_class [:mailer_class] end |
#raw_source ⇒ Object
44 45 46 |
# File 'lib/postpeek/message.rb', line 44 def raw_source mail.to_s end |
#subject ⇒ Object
24 25 26 |
# File 'lib/postpeek/message.rb', line 24 def subject [:subject] end |
#to ⇒ Object
32 33 34 |
# File 'lib/postpeek/message.rb', line 32 def to [:to] end |