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.



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

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

Instance Attribute Details

#stanzaObject (readonly)

{{{



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

def stanza
  @stanza
end

Instance Method Details

#simulateObject



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

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