def []=(name, obj)
      # If the passed object is nil, we delete the entry if it exists.
      if obj.nil?
        @root_objects.delete(name)
        return nil
      end

      # We only allow derivatives of PEROBS::Object to be stored in the
      # store.
      unless obj.is_a?(ObjectBase)
        PEROBS.log.fatal 'Object must be of class PEROBS::Object but ' +
          "is of class #{obj.class}"
      end

      unless obj.store == self
        PEROBS.log.fatal 'The object does not belong to this store.'
      end

      # Store the name and mark the name list as modified.
      @root_objects[name] = obj._id

      obj
    end
def []=(name, obj)
      # If the passed object is nil, we delete the entry if it exists.
      if obj.nil?
        @root_objects.delete(name)
        return nil
      end

      # We only allow derivatives of PEROBS::Object to be stored in the
      # store.
      unless obj.is_a?(ObjectBase)
        PEROBS.log.fatal 'Object must be of class PEROBS::Object but ' +
          "is of class #{obj.class}"
      end

      unless obj.store == self
        PEROBS.log.fatal 'The object does not belong to this store.'
      end

      # Store the name and mark the name list as modified.
      @root_objects[name] = obj._id

      obj
    end
Store the provided object under the given name. Use this to make the
 object a root or top-level object (think global variable). Each store
 should have at least one root object. Objects that are not directly or
 indirectly reachable via any of the root objects are no longer
 accessible and will be garbage collected.
 @param name [Symbol] The name to use.
 @param obj [PEROBS::Object] The object to store
 @return [PEROBS::Object] The stored object.