Class: MailHandler::Sender
- Inherits:
-
Object
- Object
- MailHandler::Sender
- Defined in:
- lib/mailhandler/sender.rb
Overview
Class for sending email, and storing details about the sending.
Direct Known Subclasses
Defined Under Namespace
Classes: Sending
Instance Attribute Summary collapse
-
#dispatcher ⇒ Object
Returns the value of attribute dispatcher.
-
#sending ⇒ Object
Returns the value of attribute sending.
Instance Method Summary collapse
- #dispatcher_client ⇒ Object
-
#initialize(dispatcher) ⇒ Sender
constructor
A new instance of Sender.
- #send_email(email) ⇒ Object
Constructor Details
Instance Attribute Details
#dispatcher ⇒ Object
Returns the value of attribute dispatcher.
10 11 12 |
# File 'lib/mailhandler/sender.rb', line 10 def dispatcher @dispatcher end |
#sending ⇒ Object
Returns the value of attribute sending.
10 11 12 |
# File 'lib/mailhandler/sender.rb', line 10 def sending @sending end |
Instance Method Details
#dispatcher_client ⇒ Object
34 35 36 |
# File 'lib/mailhandler/sender.rb', line 34 def dispatcher_client dispatcher.client if dispatcher.respond_to?(:client) end |
#send_email(email) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/mailhandler/sender.rb', line 26 def send_email(email) init_sending_details(email) response = dispatcher.send(email) update_sending_details(response) response end |