Flowdock
method

set_service_hook

Importance_1
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.

set_service_hook(&handler) public

A service-hook is called for each service request (RPC).

You can use a service-hook for example to wrap existing methods and catch exceptions of them or convert values to values recognized by XMLRPC.

You can disable it by passing nil as the handler parameter.

The service-hook is called with a Proc object along with any parameters.

An example:

server.set_service_hook {|obj, *args|
  begin
    ret = obj.call(*args)  # call the original service-method
    # could convert the return value
  rescue
    # rescue exceptions
  end
}
Show source
Register or log in to add new notes.