Top Level Namespace
Defined Under Namespace
Modules: Git, Kernel, Sawyer Classes: Dir, Numeric, String
Instance Method Summary collapse
Instance Method Details
#notify(message, options = {}, verbose = false) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ext/notify.rb', line 8 def notify(, = {}, verbose = false) # print the given message to STDERR, if the # script is running with "--verbose" option subtitle = [:subtitle] warn(subtitle ? "#{subtitle}: #{message}" : ) if $VERBOSE # send a given message to the Mac OS X Notification Center # but only if the git-multi script is running interactively # and if the "terminal-notifier" gem has been installed... interactive? && defined?(TerminalNotifier) && begin [:title] ||= 'git-multi' TerminalNotifier.notify(, , verbose) end end |