Class: Riddl::Client::XMPPRequest
- Inherits:
-
Object
- Object
- Riddl::Client::XMPPRequest
- Defined in:
- lib/ruby/riddl/client.rb
Overview
}}}
Instance Attribute Summary collapse
-
#stanza ⇒ Object
readonly
{{{.
Instance Method Summary collapse
-
#initialize(method, to, path, parameters, headers, qs, ack) ⇒ XMPPRequest
constructor
A new instance of XMPPRequest.
- #simulate ⇒ Object
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
#stanza ⇒ Object (readonly)
{{{
440 441 442 |
# File 'lib/ruby/riddl/client.rb', line 440 def stanza @stanza end |
Instance Method Details
#simulate ⇒ Object
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 |