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 65
65:         def inspect
66:             self.default.to_s
67:         end

[Source]

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

[Source]

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

[Source]

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

[Validate]