class Eye::Notify::Jabber
Public Instance Methods
execute()
click to toggle source
# File lib/eye/notify/jabber.rb, line 15 def execute debug { "send jabber #{[host, port, user, password]} - #{[contact, message_body]}" } mes = ::Jabber::Message.new(contact, message_body) mes.set_type(:normal) mes.set_id('1') mes.set_subject(message_subject) client = ::Jabber::Client.new(::Jabber::JID.new("#{user}/Eye")) client.connect(host, port) client.auth(password) client.send(mes) client.close end