Class: GrowlNotifier
- Inherits:
-
Object
- Object
- GrowlNotifier
- Defined in:
- lib/growl_notifier.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ GrowlNotifier
constructor
A new instance of GrowlNotifier.
- #notify(message, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ GrowlNotifier
Returns a new instance of GrowlNotifier.
4 5 6 7 |
# File 'lib/growl_notifier.rb', line 4 def initialize( = {}) @application = [:application] || 'ruby-growl' @to = [:to] end |
Instance Method Details
#notify(message, options = {}) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/growl_notifier.rb', line 9 def notify(, = {}) to = [:to] || @to || 'localhost' notification_type = "#{@application} notification" g = Growl.new to, @application, [notification_type] g.notify notification_type, @application, end |