Object
# File lib/xmpp4r/rpc/helper/client.rb, line 44 def call(method, *args) ok, param = call2(method, *args) if ok param else raise param end end
# File lib/xmpp4r/rpc/helper/client.rb, line 53 def call2(method, *args) request = @create.methodCall(method, *args) data = do_rpc(request) parser().parseMethodResponse(data) end
# File lib/xmpp4r/rpc/helper/client.rb, line 78 def do_rpc(xmlrpc) iq = Iq.new(:set, @jid) iq.from = @my_jid iq.id = IdGenerator::generate_id rpcquery = iq.add(IqQueryRPC.new) rpcquery.typed_add(xmlrpc) result = nil @stream.send_with_id(iq) do |iqreply| if iqreply.query.kind_of?(IqQueryRPC) result = iqreply.query.to_s end end result end
automatically trys to find a method thanx to eric cestari :)
# File lib/xmpp4r/rpc/helper/client.rb, line 39 def method_missing(methodname, *args) send("call", methodname,*args) end
Generated with the Darkfish Rdoc Generator 2.