Module: MailCatcher::Growl

Extended by:
Growl
Included in:
Growl
Defined in:
lib/mail_catcher/growl.rb

Instance Method Summary collapse

Instance Method Details

#notify(message) ⇒ Object



7
8
9
10
# 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

#startObject



3
4
5
# File 'lib/mail_catcher/growl.rb', line 3

def start
  MailCatcher::Events::MessageAdded.subscribe MailCatcher::Growl.method :notify
end