Exception: Hamli::Errors::HamlSyntaxError
- Defined in:
- lib/hamli/errors.rb
Direct Known Subclasses
MalformedIndentationError, UnexpectedEosError, UnexpectedIndentationError
Instance Method Summary collapse
-
#initialize(column:, file_path:, line:, line_number:) ⇒ HamlSyntaxError
constructor
A new instance of HamlSyntaxError.
- #to_s ⇒ String
Constructor Details
#initialize(column:, file_path:, line:, line_number:) ⇒ HamlSyntaxError
Returns a new instance of HamlSyntaxError.
13 14 15 16 17 18 19 |
# File 'lib/hamli/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/hamli/errors.rb', line 23 def to_s <<~TEXT #{error_type} at #{@file_path}:#{@line_number}:#{@column} #{@line.rstrip} #{' ' * (@column - 1)}^ TEXT end |