Class: MandrillBatchMailer::BaseMailer
- Inherits:
-
Object
- Object
- MandrillBatchMailer::BaseMailer
- Defined in:
- lib/mandrill_batch_mailer/base_mailer.rb
Class Method Summary collapse
-
.method_missing(method, *args) ⇒ Object
do it just as ActionMailer.
Instance Method Summary collapse
-
#from_email ⇒ Object
feel free to override.
-
#from_name ⇒ Object
feel free to override.
-
#initialize(method) ⇒ BaseMailer
constructor
A new instance of BaseMailer.
- #mail(to: nil) ⇒ Object
-
#tags ⇒ Object
feel free to override.
Constructor Details
#initialize(method) ⇒ BaseMailer
Returns a new instance of BaseMailer.
14 15 16 |
# File 'lib/mandrill_batch_mailer/base_mailer.rb', line 14 def initialize(method) self.caller_method_name = method end |
Class Method Details
.method_missing(method, *args) ⇒ Object
do it just as ActionMailer
40 41 42 43 44 45 46 47 |
# File 'lib/mandrill_batch_mailer/base_mailer.rb', line 40 def method_missing(method, *args) mailer = new method if mailer.respond_to? method mailer.public_send(method, *args) else super method, *args end end |
Instance Method Details
#from_email ⇒ Object
feel free to override
24 25 26 |
# File 'lib/mandrill_batch_mailer/base_mailer.rb', line 24 def from_email MandrillBatchMailer.from_email end |
#from_name ⇒ Object
feel free to override
29 30 31 |
# File 'lib/mandrill_batch_mailer/base_mailer.rb', line 29 def from_name MandrillBatchMailer.from_name || '' end |
#mail(to: nil) ⇒ Object
18 19 20 21 |
# File 'lib/mandrill_batch_mailer/base_mailer.rb', line 18 def mail(to: nil) @tos = tos_from(to) send_template mandrill_parameters end |
#tags ⇒ Object
feel free to override
34 35 36 |
# File 'lib/mandrill_batch_mailer/base_mailer.rb', line 34 def ["#{template_name}"] end |