# File lib/puppet/network/xmlrpc/client.rb, line 24 24: def self.mkclient(handler) 25: interface = handler.interface 26: namespace = interface.prefix 27: 28: # Create a subclass for every client type. This is 29: # so that all of the methods are on their own class, 30: # so that their namespaces can define the same methods if 31: # they want. 32: constant = handler.name.to_s.capitalize 33: name = namespace.downcase 34: newclient = genclass(name, :hash => @clients, :constant => constant) 35: 36: interface.methods.each { |ary| 37: method = ary[0] 38: newclient.send(:define_method,method) { |*args| 39: make_rpc_call(namespace, method, *args) 40: } 41: } 42: 43: return newclient 44: end