new(obj, uri=nil)
public
Create a new remote object
stub.
obj is the (local) object we want to create a stub for. Normally
this is nil. uri is the URI of
the remote object that this will be a stub for.
Show source
def initialize(obj, uri=nil)
@uri = nil
@ref = nil
if obj.nil?
return if uri.nil?
@uri, option = DRbProtocol.uri_option(uri, DRb.config)
@ref = DRbURIOption.new(option) unless option.nil?
else
@uri = uri ? uri : (DRb.uri rescue nil)
@ref = obj ? DRb.to_id(obj) : nil
end
end