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.



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

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



613
614
615
616
617
# File 'lib/xmlrpc/client.rb', line 613

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