class Attio::Util::CurrencyFormatter
def format_number(amount, currency_code = "USD", options = {})
-
(String)
- The formatted number without currency symbol
Parameters:
-
options
(Hash
) -- Formatting options (same as format method) -
currency_code
(String
) -- The ISO 4217 currency code -
amount
(Numeric
) -- The amount to format
def format_number(amount, currency_code = "USD", options = {}) result = format(amount, currency_code, options) symbol = symbol_for(currency_code) result.sub(/^#{Regexp.escape(symbol)}/, "") end