Exception: ParallelRSpec::ExceptionMarshallingWrapper
- Inherits:
-
Exception
- Object
- Exception
- ParallelRSpec::ExceptionMarshallingWrapper
- Defined in:
- lib/parallel_rspec/client.rb
Overview
Some Exception objects contain non-marshallable ivars such as Proc objects. This wrapper represents the bits needed by RSpec’s ExceptionPresenter, and can be dumped and loaded.
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #class ⇒ Object
-
#initialize(class_name, message, backtrace, cause) ⇒ ExceptionMarshallingWrapper
constructor
A new instance of ExceptionMarshallingWrapper.
- #inspect ⇒ Object
Constructor Details
#initialize(class_name, message, backtrace, cause) ⇒ ExceptionMarshallingWrapper
Returns a new instance of ExceptionMarshallingWrapper.
7 8 9 10 11 12 |
# File 'lib/parallel_rspec/client.rb', line 7 def initialize(class_name, , backtrace, cause) @class_name = class_name = @backtrace = backtrace @cause = cause end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
5 6 7 |
# File 'lib/parallel_rspec/client.rb', line 5 def backtrace @backtrace end |
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
5 6 7 |
# File 'lib/parallel_rspec/client.rb', line 5 def cause @cause end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
5 6 7 |
# File 'lib/parallel_rspec/client.rb', line 5 def class_name @class_name end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/parallel_rspec/client.rb', line 5 def end |
Instance Method Details
#==(other) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/parallel_rspec/client.rb', line 22 def ==(other) other.is_a?(ExceptionMarshallingWrapper) && class_name == other.class_name && == other. && backtrace == other.backtrace && cause == other.cause end |
#class ⇒ Object
14 15 16 |
# File 'lib/parallel_rspec/client.rb', line 14 def class eval "class #{@class_name}; end; #{@class_name}" end |
#inspect ⇒ Object
18 19 20 |
# File 'lib/parallel_rspec/client.rb', line 18 def inspect "#<#{@class_name}: #{@message}>" end |