method

emit

ruby latest stable - Class: YAML::Stream

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.

emit( io = nil )
public

No documentation available.

# File lib/yaml/stream.rb, line 27
                def emit( io = nil )
            # opts = @options.dup
                        # opts[:UseHeader] = true if @documents.length > 1
            out = YAML.emitter
            out.reset( io || io2 = StringIO.new )
            @documents.each { |v|
                v.to_yaml( out )
            }
            io || ( io2.rewind; io2.read )
                end