Class: ObjectPatch::FailedTestException
- Inherits:
-
BaseException
- Object
- ObjectPatch::FailedTestException
- Defined in:
- lib/object_patch/exceptions.rb
Overview
An exception that will get raised when a test operation fails after being applied to a document.
Instance Attribute Summary collapse
-
#path ⇒ String
A JSON pointer string representing the location to be checked.
-
#value ⇒ Object
The value that failed the comparison check.
Instance Method Summary collapse
-
#initialize(path, value) ⇒ void
constructor
Formats the exception message with the relevant information before actually raising the error.
Constructor Details
#initialize(path, value) ⇒ void
Formats the exception message with the relevant information before actually raising the error.
45 46 47 48 |
# File 'lib/object_patch/exceptions.rb', line 45 def initialize(path, value) super("Expected #{value} at #{path}") @path, @value = path, value end |
Instance Attribute Details
#path ⇒ String
A JSON pointer string representing the location to be checked.
36 37 38 |
# File 'lib/object_patch/exceptions.rb', line 36 def path @path end |
#value ⇒ Object
The value that failed the comparison check.
36 37 38 |
# File 'lib/object_patch/exceptions.rb', line 36 def value @value end |