Class YAML::SpecialHash
In: yaml/types.rb
Parent: ::Hash

YAML Hash class to support comments and defaults

Methods

inspect   to_s   to_yaml   update  

Attributes

default  [RW] 

Public Instance methods

[Source]

# File yaml/types.rb, line 65
        def inspect
            self.default.to_s
        end

[Source]

# File yaml/types.rb, line 68
        def to_s
            self.default.to_s
        end

[Source]

# File yaml/types.rb, line 77
        def to_yaml( opts = {} )
            opts[:DefaultKey] = self.default
            super( opts )
        end

[Source]

# File yaml/types.rb, line 71
        def update( h )
            if YAML::SpecialHash === h
                @default = h.default if h.default
            end
            super( h )
        end

[Validate]