method

to_yaml

ruby latest stable - Class: Hash

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.

to_yaml( opts = {} )
public

No documentation available.

# File lib/yaml/rubytypes.rb, line 37
        def to_yaml( opts = {} )
                YAML::quick_emit( self, opts ) do |out|
            out.map( taguri, to_yaml_style ) do |map|
                each do |k, v|
                    map.add( k, v )
                end
            end
        end
        end

1Note

What it do?

jalcine ยท Aug 6, 2012

For those favoring YAML outputs, this methods simply and recursively outputs the keys and values in YAML (into a String) for your pleasure.