Class: DeepTest::Worker::Error
- Inherits:
-
Object
- Object
- DeepTest::Worker::Error
- Defined in:
- lib/deep_test/worker.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#work_unit ⇒ Object
Returns the value of attribute work_unit.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(work_unit, error) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
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
#error ⇒ Object
Returns the value of attribute error.
45 46 47 |
# File 'lib/deep_test/worker.rb', line 45 def error @error end |
#work_unit ⇒ Object
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_s ⇒ Object
56 57 58 |
# File 'lib/deep_test/worker.rb', line 56 def to_s "#{@work_unit}: #{@error}\n" + (@error.backtrace || []).join("\n") end |