Class: Cadre::Growl::Notifier

Inherits:
Notifier
  • Object
show all
Defined in:
lib/cadre/growl/notifier.rb

Instance Attribute Summary

Attributes inherited from Notifier

#app_name, #expire_time, #message, #sound, #summary, #transient

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Notifier

#available?, availables, get, #initialize, register, registry

Constructor Details

This class inherits a constructor from Cadre::Notifier

Class Method Details

.available?Boolean


8
9
10
11
12
# File 'lib/cadre/growl/notifier.rb', line 8

def self.available?
  #XXXX This isn't going to work at all as is. Lifted from other code, as #ok
  #hints toward a working adapter
  availables["growlnotify"]
end

Instance Method Details

#goObject


14
15
16
17
18
19
# File 'lib/cadre/growl/notifier.rb', line 14

def go
#        growlnotify "--image ./autotest/fail.png -p Emergency -m '#{summary}' -t '#{message}'" #ok
#        growlnotify "--image ./autotest/pending.png -p High -m '#{summary}' -t '#{message}'" #ok
#        growlnotify "--image ./autotest/pass.png -p 'Very Low' -m '#{summary}' -t '#{message}'" #ok
  growlnotify "-m '#{summary}' -t '#{message}'" #ok
end

#growlnotify(str) ⇒ Object


21
22
23
# File 'lib/cadre/growl/notifier.rb', line 21

def growlnotify str
  system "growlnotify -n cadre #{str}"
end