Class: JsonDuplikeyStopper
- Inherits:
-
Hash
- Object
- Hash
- JsonDuplikeyStopper
- Defined in:
- lib/json_duplikey_stopper.rb
Instance Attribute Summary collapse
-
#duplicate_check_off ⇒ Object
Returns the value of attribute duplicate_check_off.
Instance Method Summary collapse
Instance Attribute Details
#duplicate_check_off ⇒ Object
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 |