Class: UniformNotifier::Growl
- Inherits:
-
Base
- Object
- Base
- UniformNotifier::Growl
show all
- Defined in:
- lib/uniform_notifier/growl.rb
Class Method Summary
collapse
Methods inherited from Base
inline_notify, wrap_js_association
Class Method Details
.active? ⇒ Boolean
5
6
7
|
# File 'lib/uniform_notifier/growl.rb', line 5
def self.active?
@growl
end
|
.out_of_channel_notify(message) ⇒ Object
9
10
11
12
|
# File 'lib/uniform_notifier/growl.rb', line 9
def self.out_of_channel_notify( message )
return unless active?
notify( message )
end
|
.setup_connection(growl) ⇒ Object
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/uniform_notifier/growl.rb', line 14
def self.setup_connection( growl )
require 'ruby-growl'
@password = growl == true ? nil : growl[:password]
@growl = connect
notify 'Uniform Notifier Growl has been turned on'
rescue LoadError
@growl = nil
raise NotificationError.new( 'You must install the ruby-growl gem to use Growl notification: `gem install ruby-growl`' )
end
|