# File lib/notify.rb, line 17 def self.html_escape(text) ERB::Util.html_escape(text) end
# File lib/notify/libnotify.rb, line 4 def self.notify(title, message, option={}) Libnotify.show(:summary => title, :body => html_escape(message), :icon_path => option[:icon]) end
# File lib/notify.rb, line 5 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
Generated with the Darkfish Rdoc Generator 2.