README.md in yaml-write-stream-1.0.0 vs README.md in yaml-write-stream-1.0.1
- old
+ new
@@ -97,11 +97,13 @@
```ruby
writer = YamlWriteStream.open('path/to/file.yml')
writer.write_map
...
-writer.close
+writer.close # also closes the underlying stream
```
+
+If you'd rather not close the underlying stream, you can call `#flush` instead, which will add necessary closing punctuation but leave the stream open. Once a yaml write stream has been flushed, it should NOT be written to again. Treat flushed streams as if they were closed.
## Requirements
Only Ruby 1.9 or greater is supported (requires the Psych emitter).