Lamina.DSL.config

You're seeing just the macro config, go back to Lamina.DSL module for more information.
Link to this macro

config(config_key)

(macro)

Specs

config(Lamina.config_key()) :: Macro.t()

Defines an individual configration parameter.

The same as config/2, except that no block is provided.

Link to this macro

config(config_key, list)

(macro)

Specs

config(Lamina.config_key(), [{:do, Macro.t()}]) :: Macro.t()

Defines an individual configration parameter.

Arguments:

  • config_key - the name of the new configuration parameter to define.
  • block - a "do block" which will be evaluated in the context of the Lamina.DSL.Config module.

Example

config :listen_port do
  cast(&Lamina.Cast.to_integer/1)
  validate(&is_integer/1)
end