Class: Eye::Notify::Jabber
- Inherits:
-
Eye::Notify
- Object
- Eye::Notify
- Eye::Notify::Jabber
- Defined in:
- lib/eye/notify/jabber.rb
Constant Summary
Constants inherited from Eye::Notify
Instance Method Summary collapse
Methods inherited from Eye::Notify
#async_notify, get_class, #initialize, #logger_sub_tag, #message_body, #message_subject, notify, #notify, register, requires, validate!
Methods included from Dsl::Validation
Constructor Details
This class inherits a constructor from Eye::Notify
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/eye/notify/jabber.rb', line 15 def execute debug "send jabber #{[host, port, user, password]} - #{[contact, ]}" mes = ::Jabber::Message.new(contact, ) mes.set_type(:normal) mes.set_id('1') mes.set_subject() client = ::Jabber::Client.new(::Jabber::JID.new("#{user}/Eye")) client.connect(host, port) client.auth(password) client.send(mes) client.close end |