Module: JRubyBridge::ObjectProxy

Defined in:
lib/jruby_bridge/object_proxy.rb

Overview

A module that patches initialization behavior to cause new instances to reside on the JRuby DRb service.

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/jruby_bridge/object_proxy.rb', line 11

def self.included(base)
  base.class_eval do

    include DRb::DRbUndumped

    class << self
      alias :proxied_new :new
      def new(*args)
        Service.new_drb_object.remote_proxied_new self, *args
      end
    end

  end # base.class_eval
end