Array (Class)

In: yaml/rubytypes.rb
Parent: Object

Sequences: Array#to_yaml

Methods

Public Instance methods

[Source]

# File yaml/rubytypes.rb, line 210
    def is_complex_yaml?
        true
    end

[Source]

# File yaml/rubytypes.rb, line 220
        def to_yaml( opts = {} )
                opts[:DocType] = self.class if Hash === opts
                YAML::quick_emit( self.object_id, opts ) { |out|
            array_type = to_yaml_type 
            if not out.options(:ExplicitTypes) and array_type == "!seq"
                array_type = ""
            end
                        
            out.seq( array_type ) { |seq|
                seq.concat( self )
            }
                }
        end

[Source]

# File yaml/rubytypes.rb, line 213
    def to_yaml_type
        if self.class == Array 
            "!seq"
        else
            "!ruby/array:#{self.class}"
        end
    end

[Validate]