mailcatcher/lib/mail_catcher/growl.rb

17 lines
389 B
Ruby
Raw Normal View History

2011-06-09 23:24:08 -04:00
module MailCatcher
module Growl
module_function
def start
MailCatcher::Events::MessageAdded.subscribe MailCatcher::Growl.method :notify
end
def notify message
system "growlnotify", "--name", "MailCatcher", "--message", "Message received:\n#{message["subject"]}"
end
# TODO: Native support on MacRuby with click backs
#def click
#end
end
end