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 methods gets.ex
Raw

lib/skeleton/methods/gets.ex

defmodule MapSchema.Methods.Gets do
@moduledoc false
@doc """
The module have the internal functionality of the methods get
"""
alias MapSchema.Exceptions
def generic_get(mapa, lista_fields) when is_map(mapa) do
get_in(mapa, lista_fields)
end
def generic_get(_, _) do
Exceptions.throw_error_should_be_a_map()
end
end