Class: XMLRPC::Client::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/xmlrpc/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(server, prefix, args = [], meth = :call, delim = ".")) ⇒ Proxy

Returns a new instance of Proxy.



601
602
603
604
605
606
# File 'lib/xmlrpc/client.rb', line 601

def initialize(server, prefix, args=[], meth=:call, delim=".")
	@server = server
	@prefix = prefix ? prefix + delim : ""
	@args   = args 
  @meth   = meth
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(mid, *args) ⇒ Object



608
609
610
611
612
# File 'lib/xmlrpc/client.rb', line 608

def method_missing(mid, *args)
	pre = @prefix + mid.to_s
	arg = @args + args
	@server.send(@meth, pre, *arg)
end