Exception: StaticMatic::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/staticmatic/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lineno, filename, message) ⇒ Error

Returns a new instance of Error



7
8
9
10
11
# File 'lib/staticmatic/error.rb', line 7

def initialize(lineno, filename, message)
  @line = lineno
  @filename = filename
  @message = message
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename



5
6
7
# File 'lib/staticmatic/error.rb', line 5

def filename
  @filename
end

#lineObject (readonly)

Returns the value of attribute line



3
4
5
# File 'lib/staticmatic/error.rb', line 3

def line
  @line
end

Instance Method Details

#messageObject



13
14
15
# File 'lib/staticmatic/error.rb', line 13

def message
  "#{@filename}, line #{@line}: #{@message}"
end