Class: Zold::Backtrace

Inherits:
Object
  • Object
show all
Defined in:
lib/zold/backtrace.rb

Overview

Backtrace of an exception

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ Backtrace

Returns a new instance of Backtrace.



28
29
30
# File 'lib/zold/backtrace.rb', line 28

def initialize(error)
  @error = error
end

Instance Method Details

#to_sObject



32
33
34
# File 'lib/zold/backtrace.rb', line 32

def to_s
  "#{@error.class.name}: #{@error.message}\n#{@error.backtrace.join("\n\t")}"
end