Class: Travis::Tools::Notification::LibNotify

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

Instance Method Summary collapse

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)

63
64
65
# File 'lib/travis/tools/notification.rb', line 63

def available?
  System.has? 'notify-send'
end

#notify(title, body) ⇒ Object


59
60
61
# File 'lib/travis/tools/notification.rb', line 59

def notify(title, body)
  system 'notify-send', '--expire-time=10000', '-h', 'int:transient:1', '-i', ICON, title, CGI.escapeHTML(body)
end