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.
43 44 45 |
# File 'lib/deep_test/worker.rb', line 43 def initialize(work_unit, error) @work_unit, @error = work_unit, error end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
41 42 43 |
# File 'lib/deep_test/worker.rb', line 41 def error @error end |
#work_unit ⇒ Object
Returns the value of attribute work_unit.
41 42 43 |
# File 'lib/deep_test/worker.rb', line 41 def work_unit @work_unit end |
Instance Method Details
#==(other) ⇒ Object
47 48 49 50 |
# File 'lib/deep_test/worker.rb', line 47 def ==(other) work_unit == other.work_unit && error == other.error end |
#to_s ⇒ Object
52 53 54 |
# File 'lib/deep_test/worker.rb', line 52 def to_s "#{@work_unit}: #{@error}\n" + (@error.backtrace || []).join("\n") end |