Class: RecordX::RXHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/recordx.rb

Instance Method Summary collapse

Constructor Details

#initialize(callerx) ⇒ RXHash

Returns a new instance of RXHash.



17
18
19
20
# File 'lib/recordx.rb', line 17

def initialize(callerx)
  super()
  @callerx = callerx 
end

Instance Method Details

#[]=(name, val) ⇒ Object



22
23
24
25
26
27
# File 'lib/recordx.rb', line 22

def []=(name, val)
  unless @callerx.send(name.to_sym) == val then
    @callerx.send((name.to_s + '=').to_sym, val) 
  end
  super(name, val)
end

#cloneObject



29
30
31
# File 'lib/recordx.rb', line 29

def clone()
  self.to_h.clone
end