Skip to content

Instantly share code, notes, and snippets.

@levity
Created July 20, 2011 00:10
Show Gist options
  • Save levity/1094065 to your computer and use it in GitHub Desktop.
Save levity/1094065 to your computer and use it in GitHub Desktop.
send a Google Talk message with Ruby
require 'xmpp4r'
include Jabber
Client.new(JID.new "#{USERNAME}/Home").instance_eval do
connect 'talk.google.com'
auth PASSWORD
send Message.new(RECIPIENT, MESSAGE).tap{|m| m.type = :chat }
close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment