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

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

Instance Method Summary collapse

Methods inherited from Growl

#available?

Constructor Details

#initializeLibNotify

Returns a new instance of LibNotify.



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

def initialize
  @command     = "notify-send"
  @expire_time = 10_000
end

Instance Method Details

#notify(title, body) ⇒ Object



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

def notify(title, body)
  system @command, "--expire-time=#{@expire_time}", title, CGI.escapeHTML(body)
end