Class YAML::SpecialHash
In: lib/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 lib/yaml/types.rb, line 63
63:         def inspect
64:             self.default.to_s
65:         end

[Source]

    # File lib/yaml/types.rb, line 66
66:         def to_s
67:             self.default.to_s
68:         end

[Source]

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

[Source]

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

[Validate]