def follow
            doc = self.document

            if doc.nil?
                raise InvalidReferenceError, "Not attached to any document"
            end

            target = doc.get_object(self)

            if target.nil? and not Origami::OPTIONS[:ignore_bad_references]
                raise InvalidReferenceError, "Cannot resolve reference : #{self}"
            end

            target or Null.new
        end
def follow
            doc = self.document

            if doc.nil?
                raise InvalidReferenceError, "Not attached to any document"
            end

            target = doc.get_object(self)

            if target.nil? and not Origami::OPTIONS[:ignore_bad_references]
                raise InvalidReferenceError, "Cannot resolve reference : #{self}"
            end

            target or Null.new
        end
Returns the object pointed to by the reference.
 The reference must be part of a document.
 Raises an InvalidReferenceError if the object cannot be found.