Exception: ForkedSlim::Parser::SyntaxError Private
- Inherits:
-
StandardError
- Object
- StandardError
- ForkedSlim::Parser::SyntaxError
- Defined in:
- lib/hamlet/forked_slim_parser.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #column ⇒ Object readonly private
- #error ⇒ Object readonly private
- #file ⇒ Object readonly private
- #line ⇒ Object readonly private
- #lineno ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(error, file, line, lineno, column) ⇒ SyntaxError
constructor
private
A new instance of SyntaxError.
- #to_s ⇒ Object private
Constructor Details
#initialize(error, file, line, lineno, column) ⇒ SyntaxError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SyntaxError.
14 15 16 17 18 19 20 |
# File 'lib/hamlet/forked_slim_parser.rb', line 14 def initialize(error, file, line, lineno, column) @error = error @file = file || '(__TEMPLATE__)' @line = line.to_s @lineno = lineno @column = column end |
Instance Attribute Details
#column ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/hamlet/forked_slim_parser.rb', line 12 def column @column end |
#error ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/hamlet/forked_slim_parser.rb', line 12 def error @error end |
#file ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/hamlet/forked_slim_parser.rb', line 12 def file @file end |
#line ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/hamlet/forked_slim_parser.rb', line 12 def line @line end |
#lineno ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/hamlet/forked_slim_parser.rb', line 12 def lineno @lineno end |
Instance Method Details
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 25 26 27 28 29 30 |
# File 'lib/hamlet/forked_slim_parser.rb', line 22 def to_s line = @line.strip column = @column + line.size - @line.size %{#{error} #{file}, Line #{lineno} #{line} #{' ' * column}^ } end |