Class: Riddl::Client::XMPPRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby/riddl/client.rb

Overview

}}}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, to, path, parameters, headers, qs, ack) ⇒ XMPPRequest

Returns a new instance of XMPPRequest.



442
443
444
445
446
447
# File 'lib/ruby/riddl/client.rb', line 442

def initialize(method, to, path, parameters, headers, qs, ack)
  path = (path.strip == '' ? '' : path)
  path += "?#{qs}" unless qs == ''
  @stanza = Protocols::XMPP::Generator.new(method,parameters,headers,ack).generate
  @stanza.to = to + path
end

Instance Attribute Details

#stanzaObject (readonly)

{{{



440
441
442
# File 'lib/ruby/riddl/client.rb', line 440

def stanza
  @stanza
end

Instance Method Details

#simulateObject



449
450
451
452
453
454
# File 'lib/ruby/riddl/client.rb', line 449

def simulate
  sock = StringIO.new('')
  sock.write @stanza.to_s
  sock.rewind
  [nil, sock, []]
end