YAML::Stream#new Method
new
Creates a new Stream object

aYamlStream.new(
  Hash opts
)

Parameters
opts
An option hash
Return Values
None

Details

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
Ex. 42: YAML::Stream.new