class Rsrb::Misc::AutoHash
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/rsrb/core/util.rb, line 54 def initialize(*args) super() @update, @update_index = args[0][:update], args[0][:update_key] unless args.empty? end
Public Instance Methods
[](k)
click to toggle source
Calls superclass method
# File lib/rsrb/core/util.rb, line 59 def [](k) if self.has_key?k super(k) else AutoHash.new(:update => self, :update_key => k) end end
[]=(k, v)
click to toggle source
Calls superclass method
# File lib/rsrb/core/util.rb, line 67 def []=(k, v) @update[@update_index] = self if @update and @update_index super end