Hydrex.Hydratable.Utils (hydrex v0.1.1)

Summary

Functions

Conditionally hydrates the given data.

Functions

maybe_hydrate(data, opts)

@spec maybe_hydrate(any(), boolean() | keyword()) :: any()

Conditionally hydrates the given data.

If the second argument is a boolean, hydration is performed if it's true. If the second argument is a keyword list, hydration is performed if :hydrate is true in the options.