YAML::SpecialHash (Class)

In: yaml/types.rb
Parent: Object::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 51
        def inspect
            self.default.to_s
        end

[Source]

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

[Source]

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

[Source]

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

[Validate]