Sha256: e5fc2676c3a73c6df6d93aae1cda4bfb64884bb0ce4cfc493f1bc6ab8aca9486

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pipe_rpc-2.1.0 lib/pipe_rpc/hub_server.rb