View Source ExKits.Macros.Constants (ex_kits v0.2.7)
This module provides a macro for defining compile-time constants in Elixir code.
Examples
# Define a constant:
defmodule MyConst do
import ExKits.Macros.Constants
const :pi, 3.14159
end
# Use a constant:
require MyConst
@pi MyConst.pi()
IO.puts(@pi)