Packages

Simple, agile, map schema in elixir with type checking, custom types with casting and validation and with json encoding

Current section

Files

Jump to
map_schema lib skeleton macros atomize_mode.ex
Raw

lib/skeleton/macros/atomize_mode.ex

defmodule MapSchema.Macros.AtomizeMode do
@moduledoc false
@doc """
The base install
"""
def install(flag_atomize) do
build_is_atomize(flag_atomize)
end
defp build_is_atomize(flag_atomize) do
quote bind_quoted: [flag_atomize: flag_atomize] do
@doc """
Say if the schema use Atomize mode.
"""
def unquote(:schema_is_atomize?)() do
unquote(flag_atomize)
end
end
end
end