Exception: Leftovers::PrecompileError

Inherits:
Error
  • Object
show all
Defined in:
lib/leftovers/precompile_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, line: nil, column: nil, display_class: nil) ⇒ PrecompileError

Returns a new instance of PrecompileError.



7
8
9
10
11
12
# File 'lib/leftovers/precompile_error.rb', line 7

def initialize(message, line: nil, column: nil, display_class: nil)
  @line = line
  @column = column
  @display_class = display_class
  super(message)
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



5
6
7
# File 'lib/leftovers/precompile_error.rb', line 5

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line.



5
6
7
# File 'lib/leftovers/precompile_error.rb', line 5

def line
  @line
end

Instance Method Details

#warn(path:) ⇒ Object



14
15
16
# File 'lib/leftovers/precompile_error.rb', line 14

def warn(path:)
  ::Leftovers.warn "#{display_class}: #{path}#{location} #{message}"
end