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.
128 129 130 131 132 |
# File 'lib/rio/ext/yaml/tie.rb', line 128 def initialize(doc,cont=nil) @doc = doc @cont = cont super(@doc) end |
Instance Attribute Details
#cont ⇒ Object (readonly)
Returns the value of attribute cont.
127 128 129 |
# File 'lib/rio/ext/yaml/tie.rb', line 127 def cont @cont end |
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
126 127 128 |
# File 'lib/rio/ext/yaml/tie.rb', line 126 def doc @doc end |
Instance Method Details
#[](key) ⇒ Object
133 134 135 136 137 138 139 |
# File 'lib/rio/ext/yaml/tie.rb', line 133 def [](key) val = super case val when ::Hash then Tie::Hash.new(val,self) else val end end |
#[]=(key, val) ⇒ Object
140 141 142 143 |
# File 'lib/rio/ext/yaml/tie.rb', line 140 def []=(key,val) self.dirty = true super end |