Module: MailCatcher::Growl
Instance Method Summary collapse
Instance Method Details
#notify(message) ⇒ Object
7 8 9 10 |
# File 'lib/mail_catcher/growl.rb', line 7 def notify image_path = File.(File.join(__FILE__, '..', '..', '..', 'public', 'images', 'logo_large.png')) system "growlnotify", "--image", image_path, "--name", "MailCatcher", "--message", "Message received:\n#{["subject"]}" end |
#start ⇒ Object
3 4 5 |
# File 'lib/mail_catcher/growl.rb', line 3 def start MailCatcher::Events::MessageAdded.subscribe MailCatcher::Growl.method :notify end |