Exception: TurboTests::FakeException
- Inherits:
-
Exception
- Object
- Exception
- TurboTests::FakeException
- Defined in:
- lib/turbo_tests.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(backtrace, message, cause) ⇒ FakeException
constructor
A new instance of FakeException.
Constructor Details
#initialize(backtrace, message, cause) ⇒ FakeException
Returns a new instance of FakeException.
29 30 31 32 33 |
# File 'lib/turbo_tests.rb', line 29 def initialize(backtrace, , cause) @backtrace = backtrace @message = @cause = cause end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
27 28 29 |
# File 'lib/turbo_tests.rb', line 27 def backtrace @backtrace end |
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
27 28 29 |
# File 'lib/turbo_tests.rb', line 27 def cause @cause end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
27 28 29 |
# File 'lib/turbo_tests.rb', line 27 def @message end |
Class Method Details
.from_obj(obj) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/turbo_tests.rb', line 35 def self.from_obj(obj) if obj obj = obj.symbolize_keys klass = Class.new(FakeException) { define_singleton_method(:name) { obj[:class_name] } } klass.new(obj[:backtrace], obj[:message], FakeException.from_obj(obj[:cause])) end end |