module PipeRpc class Hub::Server < BasicInterface kernel = ::Kernel.dup kernel.class_eval do alias_method :__rpc_server_class__, :class (instance_methods - [:__rpc_server_class__]).each{ |m| remove_method m } private_instance_methods.each{ |m| remove_method m } if respond_to? :private_instance_methods end include kernel def self.const_missing(name) ::Object.const_get(name) end def to_rpc_server_id "#{self.__rpc_server_class__.to_s}##{__id__}".to_sym end end end