Class: ActionMailer::Base
- Inherits:
-
Object
- Object
- ActionMailer::Base
- Defined in:
- lib/litmus_mailer.rb
Instance Method Summary collapse
Instance Method Details
#mail(headers = {}, &block) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/litmus_mailer.rb', line 12 def mail(headers={}, &block) result = mail_without_litmus(headers, &block) mailer = self.class.name.to_s action = caller[0][/`.*'/][1..-2].sub('block in ', '').to_s result.class.instance_eval do define_method(:litmus_test) { "#{LitmusMailer::Config.test_name_prefix}#{mailer}-#{action}" } end end |
#mail_without_litmus ⇒ Object
10 |
# File 'lib/litmus_mailer.rb', line 10 alias :mail_without_litmus :mail |