Module: Contract::ContractException

Included in:
ContractError, ContractMismatch
Defined in:
lib/carat-dev/interface_work/contracts/contract/lib/contract/exception.rb

Overview

Exceptions raised by Contract contain some usual meta-information. This module is mixed into Exceptions that provide such information.

Instance Attribute Summary collapse

Instance Attribute Details

#original_messageObject (readonly)

The original, unfiltered exception message.



32
33
34
# File 'lib/carat-dev/interface_work/contracts/contract/lib/contract/exception.rb', line 32

def original_message
  @original_message
end

#test_contractObject (readonly)

What contract was that method part of?



30
31
32
# File 'lib/carat-dev/interface_work/contracts/contract/lib/contract/exception.rb', line 30

def test_contract
  @test_contract
end

#test_methodObject (readonly)

What method implemented that test?



28
29
30
# File 'lib/carat-dev/interface_work/contracts/contract/lib/contract/exception.rb', line 28

def test_method
  @test_method
end

#test_objectObject (readonly)

What object was tested when this Exception was raised?



26
27
28
# File 'lib/carat-dev/interface_work/contracts/contract/lib/contract/exception.rb', line 26

def test_object
  @test_object
end