Exception: StaticMatic::Error

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Error) initialize(lineno, filename, message)

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

- (Object) filename (readonly)

Returns the value of attribute filename



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

def filename
  @filename
end

- (Object) line (readonly)

Returns the value of attribute line



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

def line
  @line
end

Instance Method Details

- (Object) message



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

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