Class: Travis::Tools::Notification::Growl

Inherits:
Object
  • Object
show all
Defined in:
lib/travis/tools/notification.rb

Direct Known Subclasses

LibNotify

Instance Method Summary collapse

Constructor Details

#initializeGrowl

Returns a new instance of Growl.



44
45
46
# File 'lib/travis/tools/notification.rb', line 44

def initialize
  @command = "growlnotify"
end

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/travis/tools/notification.rb', line 52

def available?
  system "which #{@command} >/dev/null 2>/dev/null" unless System.windows?
end

#notify(title, body) ⇒ Object



48
49
50
# File 'lib/travis/tools/notification.rb', line 48

def notify(title, body)
  system "%s -m %p %p >/dev/null" [@command, title, body]
end