Class: RIO::Ext::YAML::Tie::Hash
- Includes:
- Node
- Defined in:
- lib/rio/ext/yaml/tie.rb
Instance Attribute Summary collapse
-
#cont ⇒ Object
readonly
Returns the value of attribute cont.
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, val) ⇒ Object
-
#initialize(doc, cont = nil) ⇒ Hash
constructor
A new instance of Hash.
Methods included from Node
Constructor Details
#initialize(doc, cont = nil) ⇒ Hash
Returns a new instance of Hash.
114 115 116 117 118 |
# File 'lib/rio/ext/yaml/tie.rb', line 114 def initialize(doc,cont=nil) @doc = doc @cont = cont super(@doc) end |
Instance Attribute Details
#cont ⇒ Object (readonly)
Returns the value of attribute cont.
113 114 115 |
# File 'lib/rio/ext/yaml/tie.rb', line 113 def cont @cont end |
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
112 113 114 |
# File 'lib/rio/ext/yaml/tie.rb', line 112 def doc @doc end |
Instance Method Details
#[](key) ⇒ Object
119 120 121 122 123 124 125 |
# File 'lib/rio/ext/yaml/tie.rb', line 119 def [](key) val = super case val when ::Hash then Tie::Hash.new(val,self) else val end end |
#[]=(key, val) ⇒ Object
126 127 128 129 |
# File 'lib/rio/ext/yaml/tie.rb', line 126 def []=(key,val) self.dirty = true super end |