Class: HumanNumber::Formatters::Currency
- Inherits:
-
Object
- Object
- HumanNumber::Formatters::Currency
- Extended by:
- ActionView::Helpers::NumberHelper
- Defined in:
- lib/human_number/formatters/currency.rb
Class Method Summary collapse
-
.format(formatted_number, currency_code:, locale:) ⇒ String
private
Internal formatter for applying currency symbols to pre-formatted number strings.
Class Method Details
.format(formatted_number, currency_code:, locale:) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Internal formatter for applying currency symbols to pre-formatted number strings. All parameters are required - use HumanNumber.currency/human_currency for user-friendly interface.
20 21 22 23 24 25 |
# File 'lib/human_number/formatters/currency.rb', line 20 def format(formatted_number, currency_code:, locale:) locale = locale.to_sym # Apply currency formatting using user's locale to determine native vs non-native display apply_currency_formatting(formatted_number, currency_code, locale) end |