class Hash - syck-1.0.5 Documentation

# class Hash

### Public Instance Methods

to_yaml( opts = {} ) click to toggle source

    # File lib/syck/rubytypes.rb, line 38
    def to_yaml( opts = {} )
            Syck::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

yaml_initialize( tag, val ) click to toggle source

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