Class: Howitzer::MailAdapters::Abstract Abstract
- Inherits:
-
Object
- Object
- Howitzer::MailAdapters::Abstract
- Defined in:
- lib/howitzer/mail_adapters/abstract.rb
Overview
This class should not be used directly. Instead, create a subclass that implements: Abstract.find #plain_text_body #html_body #text #mail_from #recipients #received_time #sender_email #mime_part
Abstract
is the superclass of all mail adapters.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
-
.find(_recipient, _subject, _wait:) ⇒ Object
Finds an email in mailbox.
Instance Method Summary collapse
-
#html_body ⇒ Object
Returns a html body of the email message.
-
#initialize(message) ⇒ Abstract
constructor
A new instance of Abstract.
-
#mail_from ⇒ Object
Returns who has sent email data in format: User Name <user@email>.
-
#mime_part ⇒ Object
Allows to get email MIME attachment.
-
#plain_text_body ⇒ Object
Returns a plain text body of the email message.
-
#received_time ⇒ Object
Returns email received time.
-
#recipients ⇒ Object
Returns an array of recipients who has received current email.
-
#sender_email ⇒ Object
Returns sender user email.
-
#text ⇒ Object
Returns a mail text.
Constructor Details
#initialize(message) ⇒ Abstract
Returns a new instance of Abstract.
32 33 34 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 32 def initialize() @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
17 18 19 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 17 def @message end |
Class Method Details
.find(_recipient, _subject, _wait:) ⇒ Object
Finds an email in mailbox
24 25 26 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 24 def self.find(_recipient, _subject, _wait:) raise NotImplementedError end |
Instance Method Details
#html_body ⇒ Object
Returns a html body of the email message
44 45 46 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 44 def html_body raise NotImplementedError end |
#mail_from ⇒ Object
Returns who has sent email data in format: User Name <user@email>
56 57 58 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 56 def mail_from raise NotImplementedError end |
#mime_part ⇒ Object
Allows to get email MIME attachment
80 81 82 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 80 def mime_part raise NotImplementedError end |
#plain_text_body ⇒ Object
Returns a plain text body of the email message
38 39 40 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 38 def plain_text_body raise NotImplementedError end |
#received_time ⇒ Object
Returns email received time
68 69 70 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 68 def received_time raise NotImplementedError end |
#recipients ⇒ Object
Returns an array of recipients who has received current email
62 63 64 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 62 def recipients raise NotImplementedError end |
#sender_email ⇒ Object
Returns sender user email
74 75 76 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 74 def sender_email raise NotImplementedError end |
#text ⇒ Object
Returns a mail text
50 51 52 |
# File 'lib/howitzer/mail_adapters/abstract.rb', line 50 def text raise NotImplementedError end |