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.



598
599
600
601
602
603
# File 'lib/xmlrpc/client.rb', line 598

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



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

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