[ci skip] Added usage documentation for ActiveSupport::NumberHelper.

This commit is contained in:
kabirpathak 2024-07-05 13:51:55 +05:30
parent 4fa56814f1
commit 126cab3af7
1 changed files with 22 additions and 0 deletions

View File

@ -1,6 +1,28 @@
# frozen_string_literal: true
module ActiveSupport
# = Number Helper
#
# Provides methods for formatting numbers into currencies, percentages,
# phone numbers, and more.
#
# Example usage in a class:
# class Topic
# include ActiveSupport::NumberHelper
#
# def price
# number_to_currency(@price)
# end
# end
#
# Example usage in a module:
# require "active_support/number_helper"
#
# module NumberFormatting
# def format_price(price)
# ActiveSupport::NumberHelper.number_to_currency(price)
# end
# end
module NumberHelper
extend ActiveSupport::Autoload