Exception: Slimi::Errors::SlimSyntaxError
- Defined in:
- lib/slimi/errors.rb
Direct Known Subclasses
AttributeClosingDelimiterNotFoundError, InvalidEmptyAttributeError, LineEndingNotFoundError, MalformedIndentationError, RubyAttributeClosingDelimiterNotFoundError, UnexpectedEosError, UnexpectedIndentationError, UnexpectedTextAfterClosedTagError, UnknownLineIndicatorError
Instance Method Summary collapse
-
#initialize(column:, file_path:, line:, line_number:) ⇒ SlimSyntaxError
constructor
A new instance of SlimSyntaxError.
- #to_s ⇒ String
Constructor Details
#initialize(column:, file_path:, line:, line_number:) ⇒ SlimSyntaxError
Returns a new instance of SlimSyntaxError.
13 14 15 16 17 18 19 |
# File 'lib/slimi/errors.rb', line 13 def initialize(column:, file_path:, line:, line_number:) super() @column = column @file_path = file_path @line = line @line_number = line_number end |
Instance Method Details
#to_s ⇒ String
Note:
Override.
23 24 25 26 27 28 29 |
# File 'lib/slimi/errors.rb', line 23 def to_s <<~TEXT #{error_type} at #{@file_path}:#{@line_number}:#{@column} #{@line.rstrip} #{' ' * (@column - 1)}^ TEXT end |