module MailCatcher::Growl

Public Instance Methods

notify(message) click to toggle source
# File lib/mail_catcher/growl.rb, line 7
def notify message
  image_path = File.expand_path(File.join(__FILE__, '..', '..', '..', 'public', 'images', 'logo_large.png'))
  system "growlnotify", "--image", image_path, "--name", "MailCatcher", "--message", "Message received:\n#{message["subject"]}"
end
start() click to toggle source
# File lib/mail_catcher/growl.rb, line 3
def start
  MailCatcher::Events::MessageAdded.subscribe MailCatcher::Growl.method :notify
end