Class: JSONP3::Op
- Inherits:
-
Object
- Object
- JSONP3::Op
- Defined in:
- lib/json_p3/patch.rb
Overview
Base class for all JSON Patch operations
Instance Method Summary collapse
-
#apply(_value, _index) ⇒ Object
Apply the patch operation to value.
-
#name ⇒ Object
Return the name of the patch operation.
-
#to_h ⇒ Object
Return a JSON-like representation of this patch operation.
Instance Method Details
#apply(_value, _index) ⇒ Object
Apply the patch operation to value.
15 16 17 |
# File 'lib/json_p3/patch.rb', line 15 def apply(_value, _index) raise "JSON Patch operations must implement apply(value, index)" end |
#name ⇒ Object
Return the name of the patch operation.
10 11 12 |
# File 'lib/json_p3/patch.rb', line 10 def name raise "JSON Patch operations must implement #name" end |
#to_h ⇒ Object
Return a JSON-like representation of this patch operation.
20 21 22 |
# File 'lib/json_p3/patch.rb', line 20 def to_h raise "JSON Patch operations must implement #to_h" end |