Sha256: 81d7d9c892f6183e7c615f8f46fc8913fd6ac0993dfd41c7c7021ffd9bba4621
Contents?: true
Size: 631 Bytes
Versions: 1
Compression:
Stored size: 631 Bytes
Contents
require 'rubygems' require 'ruby_gntp' require 'pp' $g_host ||= "localhost" $g_priority ||= 0 $g_sticky ||= true module Kernel def g(*args, &block) # growl = Growl.new $g_host, 'g', [$0] args.push(block) if block messages = if args.empty? ['g!'] else args.map { |i| i.pretty_inspect } end # messages.each { |i| growl.notify $0, 'g', i, $g_priority, $g_sticky } messages.each { |i| GNTP.notify :app_name => $0, :title => 'g', :text => i, :sticky => $g_sticky } if args.empty? nil elsif args.size == 1 args.first else args end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
g-1.5.0 | lib/g.rb |