Initial commit
This commit is contained in:
9
lib/iban_ex/serialize.ex
Normal file
9
lib/iban_ex/serialize.ex
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
Reference in New Issue
Block a user