Maru.Params.Builder (maru_params v0.2.15)

Copy Markdown

Summary

Functions

build_param(args, env)

do_build_parser(parsers, args)

expand_alias(ast, caller)

given(name, list)

(macro)

include(module, opts \\ [])

(macro)

Merge the params blocks of a Maru.Params.Schema module into the current level.

The referenced module is only called inside a function body, so it is a runtime dependency: editing it does not recompile the modules including it. For the same reason nothing about it can be checked at compile time, use Maru.Params.verify_all/1 at boot or in a test instead.

Examples

include MyApp.Params.Address
include MyApp.Params.Address, only: :basic
include MyApp.Params.Address, only: [:basic, :full]
include MyApp.Params.Address, except: [:full]

optional(name, type)

(macro)

optional(name, type, options)

(macro)

optional(name, type, options, list)

(macro)

pop_params(env)

push_param(param, env)

put_params(params, env)

requires(name, type)

(macro)

requires(name, type, options)

(macro)

requires(name, type, options, list)

(macro)