Class/Module Index [+]

Quicksearch

Notify

Constants

VERSION

Public Class Methods

html_escape(text) click to toggle source
# File lib/notify.rb, line 18
def self.html_escape(text)
  ERB::Util.html_escape(text)
end
notify(title, message, option = {}) click to toggle source
# File lib/notify/ruby-growl.rb, line 5
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
which(prog, path=ENV['PATH']) click to toggle source
# File lib/notify.rb, line 6
def self.which(prog, path=ENV['PATH'])
  if RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|bccwin|cygwin/
    path.split(File::PATH_SEPARATOR).each {|dir|
      f = File.join(dir,prog+".exe")
      return f if File.executable?(File.join(f)) && !File.directory?(f)
    }
    nil
  else
    return system("which #{prog} > /dev/null 2>&1")
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.