Simple Jabber Implementation in Ruby

The Twitter guys have released a Jabber Implementation in Ruby.
Install with:

sudo gem install xmpp4r-simple

To send a message

jabber = Jabber::Simple.new('rex@friendosaurus.com', 'password')
jabber.deliver("bront@friendosaurus.com", "Hey! Can you help me fend off a T-Rex?")

That looks pretty easy. Or to get received messages, then set your status:

jabber.received_messages do |msg|
  puts "#{msg.body}" if msg.type == :chat
end

jabber.status(:away, "Slaying dinosaurs in the Jurassic garden.")
You can Bookmark this entry on del.icio.usbookmark this, digg this entrydigg this or check the See this page in technoraticosmos

Shanti A. Braford blogs here.

If you really want to know, just read this.



  

Powered by FeedBlitz