Class: Hash

Class | Hash
In: | yaml/rubytypes.rb
Parent: | Object

### Methods

to_yaml yaml_initialize

### Public Instance methods

to_yaml( opts = {} )

[Source]

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

yaml_initialize( tag, val )

[Source]

    # File yaml/rubytypes.rb, line 28
        def yaml_initialize( tag, val )
            if Array === val
                update Hash.[]( *val )              # Convert the map to a sequence
            elsif Hash === val
                update val
            else
                raise YAML::TypeError, "Invalid map explicitly tagged #{ tag }: " + val.inspect
            end
        end

[Validate]