Class: Test::Unit::Assertions::AssertExceptionHelper::WrappedException
- Inherits:
-
Object
- Object
- Test::Unit::Assertions::AssertExceptionHelper::WrappedException
- Defined in:
- lib/test/unit/assertions.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
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.
1822 1823 1824 |
# File 'lib/test/unit/assertions.rb', line 1822 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
1834 1835 1836 |
# File 'lib/test/unit/assertions.rb', line 1834 def method_missing(name, *args, &block) @exception.__send__(name, *args, &block) end |
Instance Attribute Details
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
1821 1822 1823 |
# File 'lib/test/unit/assertions.rb', line 1821 def exception @exception end |
Instance Method Details
#inspect ⇒ Object
1826 1827 1828 1829 1830 1831 1832 |
# File 'lib/test/unit/assertions.rb', line 1826 def inspect if default_inspect? "#{@exception.class.inspect}(<#{@exception.}>)" else @exception.inspect end end |