def write!
      writer = Snapshotify::Writer.new(self)
      writer.emitter = emitter
      writer.write
    end
def write!
      writer = Snapshotify::Writer.new(self)
      writer.emitter = emitter
      writer.write
    end
Write a document to file