Ex Contract v0.1.0 ExContract View Source
This is Elixir library application that adds support for design by contract. For intro to DbC methodology see DbC.
Link to this section Summary
Functions
This macros handles function definitions that contain implicit try
block that is followed by
rescue
, after
, or catch
. Example:
def without_even_trying do
raise "oops"
after
IO.puts "cleaning up!"
end
In this case the macro receives AST for body of this form:
[do: {...}, rescue: [...]]
The same as def macro except supports requires
and ensures
for private functions with implicit
try block
Link to this section Types
Link to this section Functions
This macros handles function definitions that contain implicit try
block that is followed by
rescue
, after
, or catch
. Example:
def without_even_trying do
raise "oops"
after
IO.puts "cleaning up!"
end
In this case the macro receives AST for body of this form:
[do: {...}, rescue: [...]]
The same as def macro except supports requires
and ensures
for private functions with implicit
try block.