Class: JSONP3::Patch::Op
- Inherits:
-
Object
- Object
- JSONP3::Patch::Op
- Defined in:
- lib/json_p3/patch/op.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.
13 14 15 |
# File 'lib/json_p3/patch/op.rb', line 13 def apply!(_value, _index) raise "JSON Patch operations must implement apply!(value, index)" end |
#name ⇒ Object
Return the name of the patch operation.
8 9 10 |
# File 'lib/json_p3/patch/op.rb', line 8 def name raise "JSON Patch operations must implement #name" end |
#to_h ⇒ Object
Return a JSON-like representation of this patch operation.
18 19 20 |
# File 'lib/json_p3/patch/op.rb', line 18 def to_h raise "JSON Patch operations must implement #to_h" end |