iban-ex/lib/iban_ex/serialize.ex

10 lines
243 B
Elixir
Raw Normal View History

2024-03-05 11:02:58 +00:00
defmodule IbanEx.Serialize do
alias IbanEx.{Iban, Formatter}
@spec to_string(Iban.t()) :: String.t()
def to_string(iban), do: Formatter.format(iban)
@spec to_map(Iban.t()) :: Map.t()
def to_map(iban), do: Map.from_struct(iban)
end