Exception: Chutzen::Expression::SyntaxError
- Inherits:
-
StandardError
- Object
- StandardError
- StandardError
- Chutzen::Expression::SyntaxError
- Defined in:
- lib/chutzen/expression/syntax_error.rb
Overview
Raised when something went wrong while parsing a Chutzen expression.
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(message, expression: nil) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
Constructor Details
#initialize(message, expression: nil) ⇒ SyntaxError
Returns a new instance of SyntaxError.
9 10 11 12 |
# File 'lib/chutzen/expression/syntax_error.rb', line 9 def initialize(, expression: nil) super() @expression = expression end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
7 8 9 |
# File 'lib/chutzen/expression/syntax_error.rb', line 7 def expression @expression end |
Instance Method Details
#as_json ⇒ Object
14 15 16 |
# File 'lib/chutzen/expression/syntax_error.rb', line 14 def as_json { 'error' => details } end |