Exception: JsonMask::ParseError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- JsonMask::ParseError
- Defined in:
- lib/json_mask/error.rb
Overview
Raised when a field selector does not conform to the supported grammar.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(reason, expression:, offset:) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(reason, expression:, offset:) ⇒ ParseError
Returns a new instance of ParseError.
8 9 10 11 12 13 14 |
# File 'lib/json_mask/error.rb', line 8 def initialize(reason, expression:, offset:) @reason = reason @expression = expression @offset = offset super("#{reason} at offset #{offset}") end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
6 7 8 |
# File 'lib/json_mask/error.rb', line 6 def expression @expression end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
6 7 8 |
# File 'lib/json_mask/error.rb', line 6 def offset @offset end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
6 7 8 |
# File 'lib/json_mask/error.rb', line 6 def reason @reason end |