method

new

ruby latest stable - Class: YAML::YamlNode

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.

new(t, v)
public

No documentation available.

# File lib/yaml/yamlnode.rb, line 14
        def initialize(t, v)
            @type_id = t
            if Hash === v
                @kind = 'map'
                @value = {}
                v.each {|key,val|
                    @value[key.transform] = [key, val]
                }
            elsif Array === v
                @kind = 'seq'
                @value = v
            elsif String === v
                @kind = 'scalar'
                @value = v
            end
        end