Money v1.3.2 Money.Sigils View Source

Link to this section Summary

Functions

Handles the sigil ~M for Money

Link to this section Functions

Link to this macro sigil_M(arg, currency) View Source (macro)

Handles the sigil ~M for Money

The lower case ~m variant does not exist as interpolation and excape characters are not useful for Money sigils.

Usage

import Money.Sigils
~M[1000] # With a configured default currency (e.g. GBP)
#> %Money{amount: 1000, currency: :GBP3}

~M[1000]USD
#> %Money{amount: 1000, currency: :USD}