class MJ_Hash
Public Class Methods
new(parent = nil, key = nil)
click to toggle source
Calls superclass method
# File lib/mj_hash.rb, line 2 def initialize(parent = nil, key = nil) @parent = parent @key = key super() end
Public Instance Methods
[](key)
click to toggle source
Calls superclass method
# File lib/mj_hash.rb, line 7 def [](key) if super(key) super(key) else MJ_Hash.new(self, key) end end
[]=(key,value)
click to toggle source
Calls superclass method
# File lib/mj_hash.rb, line 14 def []=(key,value) val = super(key, value) if @parent @parent[@key] = self end val end