Class: Hoover::ActionMailerLogSubscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/hoover/log_subscribers/action_mailer_log_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#deliver(event) ⇒ Object



3
4
5
6
7
# File 'lib/hoover/log_subscribers/action_mailer_log_subscriber.rb', line 3

def deliver(event)
  recipients = Array.wrap(event.payload[:to])
  Hoover.add(:sent_mail_to => recipients)
  Hoover.add(:sent_mail_duration => event.duration)
end