def convert_object_to_reference(object, build: true, tentative: false)
      iterate_non_primitives(object) do |object|
        case
        when exposed_local?(object) then @local_references.from_object(object, build: build, tentative: tentative)
        when exposed_remote?(object) then @remote_references.from_object(object) # must already exist
        #when child ...
        end
      end
    end
def convert_object_to_reference(object, build: true, tentative: false)
      iterate_non_primitives(object) do |object|
        case
        when exposed_local?(object) then @local_references.from_object(object, build: build, tentative: tentative)
        when exposed_remote?(object) then @remote_references.from_object(object) # must already exist
        #when child ...
        end
      end
    end
Converts objects to their references.
 {LocalObject}s are converted to {LocalReference}s and {RemoteObject}s to {RemoteReference}s.
 Primitives are unchanged.
 @param object [::Array<::Array,::Boolean,::Exception,ExposedObject,::Float,Hash,::Integer,nil,::String>]
 @param build [Boolean] build local reference if an existing one does not exist already
 @param tentative [Boolean] allow local reference to be quietly forgotten if rejected
 @return [::Array<::Array,::Boolean,::Exception,::Float,Hash,::Integer,nil,Reference,::String>]