Current section
Files
Jump to
Current section
Files
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