Class: TestBench::Controls::Error::BacktraceLocation

Inherits:
Object
  • Object
show all
Defined in:
lib/test_bench/controls/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, lineno, label) ⇒ BacktraceLocation

Returns a new instance of BacktraceLocation.



37
38
39
40
41
# File 'lib/test_bench/controls/error.rb', line 37

def initialize path, lineno, label
  @label = label
  @lineno = lineno
  @path = path
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



33
34
35
# File 'lib/test_bench/controls/error.rb', line 33

def label
  @label
end

#linenoObject (readonly)

Returns the value of attribute lineno.



34
35
36
# File 'lib/test_bench/controls/error.rb', line 34

def lineno
  @lineno
end

#pathObject (readonly)

Returns the value of attribute path.



35
36
37
# File 'lib/test_bench/controls/error.rb', line 35

def path
  @path
end

Instance Method Details

#to_sObject



43
44
45
# File 'lib/test_bench/controls/error.rb', line 43

def to_s
  "#{path}:#{lineno}:in `#{label}'"
end