SoftBank.Cldr.Money.new-exclamation-mark

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

new!(currency_code, amount, options \\ [])

View Source

Specs

Returns a %:'Elixir.Money'{} struct from a currency code and a currency amount. Raises an exception if the current code is invalid.

Arguments

  • currency_code is an ISO4217 three-character upcased binary or atom

  • amount is an integer, float or Decimal

Examples

Money.new!(:XYZZ, 100)
** (Money.UnknownCurrencyError) Currency :XYZZ is not known
  (ex_money) lib/money.ex:177: Money.new!/2