Class: Test::Unit::Assertions::AssertExceptionHelper::WrappedException
- Inherits:
-
Object
- Object
- Test::Unit::Assertions::AssertExceptionHelper::WrappedException
- Defined in:
- lib/test/unit/assertions.rb
Instance Method Summary collapse
-
#initialize(exception) ⇒ WrappedException
constructor
A new instance of WrappedException.
- #inspect ⇒ Object
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(exception) ⇒ WrappedException
Returns a new instance of WrappedException.
907 908 909 |
# File 'lib/test/unit/assertions.rb', line 907 def initialize(exception) @exception = exception end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
921 922 923 |
# File 'lib/test/unit/assertions.rb', line 921 def method_missing(name, *args, &block) @exception.send(name, *args, &block) end |
Instance Method Details
#inspect ⇒ Object
911 912 913 914 915 916 917 918 919 |
# File 'lib/test/unit/assertions.rb', line 911 def inspect inspect_method = @exception.method(:inspect) if inspect_method.respond_to?(:owner) and inspect_method.owner == Exception "#{@exception.class.inspect}(#{@exception..inspect})" else @exception.inspect end end |