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.



19
20
21
22
# File 'lib/recordx.rb', line 19

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

Instance Method Details

#[]=(name, val) ⇒ Object



24
25
26
27
28
29
# File 'lib/recordx.rb', line 24

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

#clone ⇒ Object



31
32
33
# File 'lib/recordx.rb', line 31

def clone()
  self.to_h.clone
end