Ex Contract v0.1.2 ExContract.ConditionMsg View Source
This module is not meant to be used directly by client code. This module holds data related to contract condition and optional message that is reported when such condition fails.
Link to this section Summary
Types
Defines fields that store ExContract compile state.
:condition- tuple representing an AST of Elixir conditon statement that is to return boolean.:msg- an optional message that is to be retported when the:conditionturns out to befalse
Functions
Create an instance of CondMsg given provided condition. Sets msg to nil
Create an instance of ExContract.ConditionMsg given provided condition and msg
Link to this section Types
Defines fields that store ExContract compile state.
:condition- tuple representing an AST of Elixir conditon statement that is to return boolean.:msg- an optional message that is to be retported when the:conditionturns out to befalse.
Link to this section Functions
Link to this function
new(condition)
View Source
new(condition :: tuple()) :: ExContract.ConditionMsg.t()
Create an instance of CondMsg given provided condition. Sets msg to nil.
Link to this function
new(condition, msg)
View Source
new(condition :: tuple(), msg :: String.t()) :: ExContract.ConditionMsg.t()
Create an instance of ExContract.ConditionMsg given provided condition and msg.