Flowdock
method

dispatch

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: BasicServer

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.

dispatch(methodname, *args) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/xmlrpc/server.rb, line 294
  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
Register or log in to add new notes.