Class: JsonDuplikeyStopper

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#duplicate_check_offObject

Returns the value of attribute duplicate_check_off.



2
3
4
# File 'lib/json_duplikey_stopper.rb', line 2

def duplicate_check_off
  @duplicate_check_off
end

Instance Method Details

#[]=(key, value) ⇒ Object



3
4
5
6
7
# File 'lib/json_duplikey_stopper.rb', line 3

def []=(key, value)
  raise if !duplicate_check_off && key?(key)
  
  super
end