Class: Roodi::Core::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/roodi/core/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, line_number, message) ⇒ Error

Returns a new instance of Error.



6
7
8
9
10
# File 'lib/roodi/core/error.rb', line 6

def initialize(filename, line_number, message)
  @filename = filename
  @line_number = line_number
  @message = message
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



4
5
6
# File 'lib/roodi/core/error.rb', line 4

def filename
  @filename
end

#line_numberObject (readonly)

Returns the value of attribute line_number.



4
5
6
# File 'lib/roodi/core/error.rb', line 4

def line_number
  @line_number
end

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/roodi/core/error.rb', line 4

def message
  @message
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/roodi/core/error.rb', line 12

def to_s
  "#{@filename}:#{@line_number} - #{@message}"
end