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

t()

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 :condition turns out to be false

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

Link to this type t() View Source
t() :: %ExContract.ConditionMsg{condition: tuple(), msg: String.t()}

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 :condition turns out to be false.

Link to this section Functions

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.