Lightning.BuildMacros (Lightning v2.13.5-pre)

View Source

Macros for building Lightning.

Summary

Functions

Conditionally evaluates the block if the current environment is in the given list of environments.

Functions

do_in(envs, list)

(macro)
@spec do_in([atom()] | atom(), [{:do, Macro.t()}]) :: Macro.t()

Conditionally evaluates the block if the current environment is in the given list of environments.

Examples

do_in(:dev) do
  IO.puts("This will only be printed in the dev environment")
end

do_in([:dev, :test]) do
  IO.puts("This will only be printed in the dev and test environments")
end