Class: JabberAdmin::Commands::SendStanza

Inherits:
Object
  • Object
show all
Defined in:
lib/jabber_admin/commands/send_stanza.rb

Overview

Send a stanza; provide From JID and valid To JID.

Class Method Summary collapse

Class Method Details

.call(callable, from:, to:, stanza:) ⇒ Object

Pass the correct data to the given callable.

Parameters:

  • callable (Proc, #call)

    the callable to call

  • from (String)

    user JID wo/ resource (eg. tom@localhost)

  • to (String)

    user/room JID wo/ resource (eg. bob@localhost)

  • stanza (String)

    the XML stanz to send (eg. <message><ext attr='value'/></message>)



16
17
18
# File 'lib/jabber_admin/commands/send_stanza.rb', line 16

def self.call(callable, from:, to:, stanza:)
  callable.call('send_stanza', from: from, to: to, stanza: stanza)
end