method
dispatch
v1_9_3_392 -
Show latest stable
- Class:
XMLRPC::BasicServer
dispatch(methodname, *args)private
method dispatch
# File lib/xmlrpc/server.rb, line 324
def dispatch(methodname, *args)
for name, obj in @handler
if obj.kind_of? Proc
next unless methodname == name
else
next unless methodname =~ /^#{name}(.+)$/
next unless obj.respond_to? $1
obj = obj.method($1)
end
if check_arity(obj, args.size)
if @service_hook.nil?
return obj.call(*args)
else
return @service_hook.call(obj, *args)
end
end
end
if @default_handler.nil?
raise XMLRPC::FaultException.new(ERR_METHOD_MISSING, "Method #{methodname} missing or wrong number of parameters!")
else
@default_handler.call(methodname, *args)
end
end Related methods
- Instance methods
- add_handler
- add_introspection
- add_multicall
- get_default_handler
- get_service_hook
- process
- set_default_handler
- set_service_hook
- Class methods
- new
- Private methods
-
call_method -
check_arity -
dispatch -
handle -
multicall_fault