Class: Syck::SpecialHash
Overview
YAML Hash class to support comments and defaults
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
Instance Method Summary collapse
Methods inherited from Hash
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default
62 63 64 |
# File 'lib/syck/types.rb', line 62 def default @default end |
Instance Method Details
#inspect ⇒ Object
63 64 65 |
# File 'lib/syck/types.rb', line 63 def inspect self.default.to_s end |
#to_s ⇒ Object
66 67 68 |
# File 'lib/syck/types.rb', line 66 def to_s self.default.to_s end |
#to_yaml(opts = {}) ⇒ Object
75 76 77 78 |
# File 'lib/syck/types.rb', line 75 def to_yaml( opts = {} ) opts[:DefaultKey] = self.default super( opts ) end |