Exception: Drunit::RemoteError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Drunit::RemoteError
- Defined in:
- lib/drunit.rb,
lib/drunit/remote_test.rb
Class Method Summary collapse
Instance Method Summary collapse
- #class ⇒ Object
-
#initialize(real_exception) ⇒ RemoteError
constructor
A new instance of RemoteError.
- #look_up_exception ⇒ Object
Constructor Details
#initialize(real_exception) ⇒ RemoteError
Returns a new instance of RemoteError.
6 7 8 |
# File 'lib/drunit/remote_test.rb', line 6 def initialize(real_exception) @real_exception = real_exception end |
Class Method Details
.name ⇒ Object
3 4 5 |
# File 'lib/drunit.rb', line 3 def self.name @@name end |
Instance Method Details
#class ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/drunit.rb', line 7 def class if type = look_up_exception return type else @@name = @real_exception.to_s super end end |
#look_up_exception ⇒ Object
16 17 18 19 20 |
# File 'lib/drunit.rb', line 16 def look_up_exception @real_exception.split("::").inject(Object){|node, part| node && node.const_defined?(part) && node.const_get(part) } end |