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.



490
491
492
493
494
495
# File 'lib/ruby/riddl/client.rb', line 490

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)

{{{



488
489
490
# File 'lib/ruby/riddl/client.rb', line 488

def stanza
  @stanza
end

Instance Method Details

#simulateObject



497
498
499
500
501
502
# File 'lib/ruby/riddl/client.rb', line 497

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