Class: Travis::Tools::Notification::Growl
- Inherits:
-
Object
- Object
- Travis::Tools::Notification::Growl
- Defined in:
- lib/travis/tools/notification.rb
Direct Known Subclasses
Instance Method Summary collapse
- #available? ⇒ Boolean
-
#initialize ⇒ Growl
constructor
A new instance of Growl.
- #notify(title, body) ⇒ Object
Constructor Details
#initialize ⇒ Growl
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
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 |