Class: DeepTest::Agent::Error
- Inherits:
-
Object
- Object
- DeepTest::Agent::Error
- Includes:
- CentralCommand::Result
- Defined in:
- lib/deep_test/agent.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#work_unit ⇒ Object
Returns the value of attribute work_unit.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #_dump(limit) ⇒ 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.
84 85 86 |
# File 'lib/deep_test/agent.rb', line 84 def initialize(work_unit, error) @work_unit, @error = work_unit, error end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
82 83 84 |
# File 'lib/deep_test/agent.rb', line 82 def error @error end |
#work_unit ⇒ Object
Returns the value of attribute work_unit.
82 83 84 |
# File 'lib/deep_test/agent.rb', line 82 def work_unit @work_unit end |
Class Method Details
._load(string) ⇒ Object
94 95 96 |
# File 'lib/deep_test/agent.rb', line 94 def self._load(string) new *Marshal.load(string) end |
Instance Method Details
#==(other) ⇒ Object
98 99 100 101 |
# File 'lib/deep_test/agent.rb', line 98 def ==(other) work_unit == other.work_unit && error == other.error end |
#_dump(limit) ⇒ Object
88 89 90 91 92 |
# File 'lib/deep_test/agent.rb', line 88 def _dump(limit) Marshal.dump([@work_unit, @error], limit) rescue Marshal.dump(["<< Undumpable >>", @error], limit) end |
#to_s ⇒ Object
103 104 105 |
# File 'lib/deep_test/agent.rb', line 103 def to_s "#{@work_unit}: #{@error}\n" + (@error.backtrace || []).join("\n") end |