Method: JsonDiff.replace
- Defined in:
- lib/json-diff/operation.rb
.replace(path, before, after) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/json-diff/operation.rb', line 27 def self.replace(path, before, after) if before != nil {'op' => 'replace', 'path' => path, 'was' => before, 'value' => after} else {'op' => 'replace', 'path' => path, 'value' => after} end end |