Class: MnoEnterprise::MailClient
- Inherits:
-
Object
- Object
- MnoEnterprise::MailClient
- Defined in:
- lib/mno_enterprise/mail_client.rb
Overview
Abstract the email sending logic
Class Method Summary collapse
-
.adapter=(name_or_adapter) ⇒ Object
Specify the mail adapter.
- .deliver(*args) ⇒ Object
Class Method Details
.adapter=(name_or_adapter) ⇒ Object
Specify the mail adapter. The default email adapter is the :mandrill adapter.
8 9 10 11 12 13 14 15 16 |
# File 'lib/mno_enterprise/mail_client.rb', line 8 def self.adapter=(name_or_adapter) @@adapter = \ case name_or_adapter when Symbol, String load_adapter(name_or_adapter) else name_or_adapter if name_or_adapter.respond_to?(:deliver) end end |
.deliver(*args) ⇒ Object
19 20 21 |
# File 'lib/mno_enterprise/mail_client.rb', line 19 def self.deliver(*args) adapter.deliver(*args) end |