Exception: Slim::Parser::SyntaxError Private

Inherits:
StandardError
  • Object
show all
Defined in:
lib/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

Instance Method Summary collapse

Constructor Details

#initialize(error, file, line, lineno, column = 0) ⇒ 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.



10
11
12
13
14
15
16
# File 'lib/slim/parser.rb', line 10

def initialize(error, file, line, lineno, column = 0)
  @error = error
  @file = file || '(__TEMPLATE__)'
  @line = line.strip
  @lineno = lineno
  @column = column
end

Instance Attribute Details

#columnObject (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.



8
9
10
# File 'lib/slim/parser.rb', line 8

def column
  @column
end

#errorObject (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.



8
9
10
# File 'lib/slim/parser.rb', line 8

def error
  @error
end

#fileObject (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.



8
9
10
# File 'lib/slim/parser.rb', line 8

def file
  @file
end

#lineObject (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.



8
9
10
# File 'lib/slim/parser.rb', line 8

def line
  @line
end

#linenoObject (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.



8
9
10
# File 'lib/slim/parser.rb', line 8

def lineno
  @lineno
end

Instance Method Details

#to_sObject

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.



18
19
20
21
22
23
24
# File 'lib/slim/parser.rb', line 18

def to_s
  %{#{error}
  #{file}, Line #{lineno}
    #{line}
    #{' ' * column}^
  }
end