TypeClass.Utility.Attribute (TypeClass v1.2.8) View Source

Helpers to module attributes

Link to this section Summary

Functions

Retrieve the compile-time value stored at the specified attribute key

Set up a compile time attribute key for getting and setting

Set a compile-time module attribute

Link to this section Functions

Link to this macro

get(attribute)

View Source (macro)

Specs

get(atom()) :: any()

Retrieve the compile-time value stored at the specified attribute key

Link to this macro

register(attribute, opts \\ [])

View Source (macro)

Specs

register(atom(), []) :: no_return()

Set up a compile time attribute key for getting and setting

Link to this macro

set(value, list)

View Source (macro)

Specs

set(atom(), [{:as, atom()}]) :: no_return()

Set a compile-time module attribute