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.



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

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

Instance Method Details

#[]=(name, val) ⇒ Object



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

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



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

def clone()
  self.to_h.clone
end