Money.abs

You're seeing just the function abs, go back to Money module for more information.

Specs

abs(money :: t()) :: t()

The absolute value of a Money amount. Returns a Money type with a positive sign for the amount.

Arguments

  • money is any valid Money.t type returned by Money.new/2

Returns

  • a Money.t

Example

iex> m = Money.new("USD", -100)
iex> Money.abs(m)
#Money<:USD, 100>