Dinheiro v0.1.2 Moeda View Source
Documentation for Moeda.
Link to this section Summary
Functions
Return a map from an atom or string that represents an ISO 4217 code
Return an atom from a value that represents an ISO 4217 code
Return a multiplication factor from an ISO 4217 code
Link to this section Functions
Return a map from an atom or string that represents an ISO 4217 code.
Examples
iex> Moeda.find(:BRL)
%{ nome: "Brazilian Real", simbolo: "R$", codigo: "BRL", codigo_iso: 986, expoente: 2 }
iex> Moeda.find("BRL")
%{ nome: "Brazilian Real", simbolo: "R$", codigo: "BRL", codigo_iso: 986, expoente: 2 }
iex> Moeda.find("")
nil
Its function ignore case sensitive.
Examples
iex> Moeda.find(:brl)
%{ nome: "Brazilian Real", simbolo: "R$", codigo: "BRL", codigo_iso: 986, expoente: 2 }
iex> Moeda.find("brl")
%{ nome: "Brazilian Real", simbolo: "R$", codigo: "BRL", codigo_iso: 986, expoente: 2 }
Return an atom from a value that represents an ISO 4217 code.
Examples
iex> Moeda.get_atom(:BRL)
:BRL
iex> Moeda.get_atom("BRL")
:BRL
iex> Moeda.get_atom("")
nil
Its function ignore case sensitive.
Examples
iex> Moeda.get_atom(:brl)
:BRL
iex> Moeda.get_atom("brl")
:BRL
Return a multiplication factor from an ISO 4217 code.
Examples
iex> Moeda.get_factor(:BRL)
100.0
iex> Moeda.get_factor("BRL")
100.0
iex> Moeda.get_factor("")
nil
Its function ignore case sensitive.
Examples
iex> Moeda.get_factor(:brl)
100.0
iex> Moeda.get_factor("brl")
100.0