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.
49 50 51 |
# File 'lib/travis/tools/notification.rb', line 49 def initialize @command = "growlnotify" end |
Instance Method Details
#available? ⇒ Boolean
57 58 59 |
# File 'lib/travis/tools/notification.rb', line 57 def available? system "which #{@command} >/dev/null 2>/dev/null" unless System.windows? end |
#notify(title, body) ⇒ Object
53 54 55 |
# File 'lib/travis/tools/notification.rb', line 53 def notify(title, body) system @command, '-n', 'Travis', '--image', ICON, '-m', body, title end |