File: ruby-growl.rb

package info (click to toggle)
ruby-notify 0.5.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 144 kB
  • sloc: ruby: 112; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 337 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
module Notify
  begin
    require 'ruby-growl'

    def self.notify(title, message, option = {})
      @@growl = Growl.new 'localhost', option[:app_name] || "ruby"
      @@growl.add_notification 'notify'
      @@growl.notify 'notify', title, message, option[:priority] || 0, option[:sticky] || false
    end
  rescue LoadError
  end
end