module PipeRpc module SubjectServers; end class SubjectServer < Server def initialize(server_subject) @server_subject = server_subject end def __rpc_server_class_name__ if @server_subject.respond_to? :__rpc_server_class_name__ @server_subject.__rpc_server_class_name__ elsif @server_subject.is_a? Module @server_subject.to_s else @server_subject.class.to_s end end def __rpc_server_instance_id__ if @server_subject.respond_to? :rpc_server_instance_id @server_subject.rpc_server_instance_id elsif @server_subject.is_a? Module nil else @server_subject.__id__.to_s end end end class << SubjectServer def from_rpc_transport(gateway, server) if self === server instance_eval_for(server, '@server_subject') else server end end end end