Exception: Ryac::SyntaxError
- Inherits:
-
InputError
- Object
- StandardError
- Error
- InputError
- Ryac::SyntaxError
- Defined in:
- lib/ryac/errors.rb,
sig/ryac/errors.rbs
Overview
The input does not parse. Carries the coordinates of the first error.
Instance Attribute Summary collapse
-
#column ⇒ Integer?
readonly
Returns the value of attribute column.
-
#line ⇒ Integer?
readonly
Returns the value of attribute line.
-
#path ⇒ String?
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(message, path: nil, line: nil, column: nil) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
Constructor Details
#initialize(message, path: nil, line: nil, column: nil) ⇒ SyntaxError
Returns a new instance of SyntaxError.
24 25 26 27 28 29 30 |
# File 'lib/ryac/errors.rb', line 24 def initialize(, path: nil, line: nil, column: nil) @path = path @line = line @column = column = "#{path}:#{line}:#{column}: #{}" if path super() end |
Instance Attribute Details
#column ⇒ Integer? (readonly)
Returns the value of attribute column.
22 23 24 |
# File 'lib/ryac/errors.rb', line 22 def column @column end |
#line ⇒ Integer? (readonly)
Returns the value of attribute line.
22 23 24 |
# File 'lib/ryac/errors.rb', line 22 def line @line end |
#path ⇒ String? (readonly)
Returns the value of attribute path.
22 23 24 |
# File 'lib/ryac/errors.rb', line 22 def path @path end |