Cldr.Unit.new-exclamation-mark
You're seeing just the function
new-exclamation-mark
, go back to Cldr.Unit module for more information.
Returns a new Unit.t
struct or raises on error.
Arguments
value
is any float, integer orDecimal
unit
is any unit returned byCldr.Unit.known_units/0
Returns
unit
orraises an exception
Examples
iex> Cldr.Unit.new! 23, :gallon
#Cldr.Unit<:gallon, 23>
Cldr.Unit.new! 14, :gadzoots
** (Cldr.UnknownUnitError) The unit :gadzoots is not known.
(ex_cldr_units) lib/cldr/unit.ex:57: Cldr.Unit.new!/2