Module: Contract::ContractException
- Included in:
- ContractError, ContractMismatch
- Defined in:
- lib/contract/exception.rb
Overview
Exceptions raised by Contract contain some useful meta-information. This module is mixed into Exceptions that provide such information.
Instance Attribute Summary collapse
-
#original_message ⇒ Object
readonly
The original, unfiltered exception message.
-
#test_contract ⇒ Object
readonly
What contract was that method part of?.
-
#test_method ⇒ Object
readonly
What method implemented that test?.
-
#test_object ⇒ Object
readonly
What object was tested when this Exception was raised?.
Instance Attribute Details
#original_message ⇒ Object (readonly)
The original, unfiltered exception message.
35 36 37 |
# File 'lib/contract/exception.rb', line 35 def @original_message end |
#test_contract ⇒ Object (readonly)
What contract was that method part of?
33 34 35 |
# File 'lib/contract/exception.rb', line 33 def test_contract @test_contract end |
#test_method ⇒ Object (readonly)
What method implemented that test?
31 32 33 |
# File 'lib/contract/exception.rb', line 31 def test_method @test_method end |
#test_object ⇒ Object (readonly)
What object was tested when this Exception was raised?
29 30 31 |
# File 'lib/contract/exception.rb', line 29 def test_object @test_object end |