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.
490 491 492 493 494 495 496 |
# 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 == '' path.gsub!(/\/+/,'/') @stanza = Protocols::XMPP::Generator.new(method,parameters,headers,ack).generate @stanza.to = to + path end |
Instance Attribute Details
#stanza ⇒ Object (readonly)
{{{
488 489 490 |
# File 'lib/ruby/riddl/client.rb', line 488 def stanza @stanza end |
Instance Method Details
#simulate ⇒ Object
498 499 500 501 502 503 |
# File 'lib/ruby/riddl/client.rb', line 498 def simulate sock = StringIO.new('') sock.write @stanza.to_s sock.rewind [nil, sock, []] end |