SoftBank.Cldr.Money.div-exclamation-mark

You're seeing just the function div-exclamation-mark, go back to SoftBank.Cldr.Money module for more information.

Divide a Money value by a number and raise on error.

Arguments

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

  • number is an integer, float or Decimal.t

Returns

  • a Money.t struct or

  • raises an exception

Examples

iex> SoftBank.Cldr.Money.div Money.new(:USD, 200), 2
{:ok, Money.new(:USD, 100)}

SoftBank.Cldr.Money.div(Money.new(:USD, 200), "xx")
** (ArgumentError) "Cannot divide money by \"xx\""]}}