aYamlStream.new( Hash opts )
The YAML::Stream object is a simple means of organizing many YAML documents into a single stream. A Stream object can be created with an option hash or, alternatively, loaded by YAML::load_stream.
d = YAML::Stream.new( :Indent => 4, :UseHeader => true ) d.add( 'one' ) d.add( 'two' ) d.add( 'three' ) puts d.emit # prints: # --- one # --- two # --- three