Class: DeepTest::Worker::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_test/worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(work_unit, error) ⇒ Error

Returns a new instance of Error.



47
48
49
# File 'lib/deep_test/worker.rb', line 47

def initialize(work_unit, error)
  @work_unit, @error = work_unit, error
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



45
46
47
# File 'lib/deep_test/worker.rb', line 45

def error
  @error
end

#work_unitObject

Returns the value of attribute work_unit.



45
46
47
# File 'lib/deep_test/worker.rb', line 45

def work_unit
  @work_unit
end

Instance Method Details

#==(other) ⇒ Object



51
52
53
54
# File 'lib/deep_test/worker.rb', line 51

def ==(other)
  work_unit == other.work_unit &&
      error == other.error
end

#to_sObject



56
57
58
# File 'lib/deep_test/worker.rb', line 56

def to_s
  "#{@work_unit}: #{@error}\n" + (@error.backtrace || []).join("\n")
end