Skip to content

Commit

Permalink
copy edits
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Jan 4, 2012
1 parent c8fe025 commit 6fca931
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions actionpack/lib/action_view/helpers/number_helper.rb
Expand Up @@ -38,8 +38,7 @@ def initialize(number)
# * <tt>:extension</tt> - Specifies an extension to add to the end of the
# generated number.
# * <tt>:country_code</tt> - Sets the country code for the phone number.
# * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid
# number is given.
# * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
#
# ==== Examples
#
Expand All @@ -52,7 +51,7 @@ def initialize(number)
# number_to_phone(1235551234, :country_code => 1) # => +1-123-555-1234
# number_to_phone("123a456") # => 123a456
#
# number_to_phone("1234a567", :raise => true) # => raise InvalidNumberError
# number_to_phone("1234a567", :raise => true) # => InvalidNumberError
#
# number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimiter => ".")
# # => +1.123.555.1234 x 1343
Expand Down Expand Up @@ -103,8 +102,7 @@ def number_to_phone(number, options = {})
# an hyphen to the formatted number given by <tt>:format</tt>).
# Accepts the same fields than <tt>:format</tt>, except
# <tt>%n</tt> is here the absolute value of the number.
# * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid
# number is given.
# * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
#
# ==== Examples
#
Expand All @@ -114,7 +112,7 @@ def number_to_phone(number, options = {})
# number_to_currency(1234567890.506, :locale => :fr) # => 1 234 567 890,51 €
# number_to_currency("123a456") # => $123a456
#
# number_to_currency("123a456", :raise => true) # => raise InvalidNumberError
# number_to_currency("123a456", :raise => true) # => InvalidNumberError
#
# number_to_currency(-1234567890.50, :negative_format => "(%u%n)")
# # => ($1,234,567,890.50)
Expand Down Expand Up @@ -170,8 +168,7 @@ def number_to_currency(number, options = {})
# * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to "").
# * <tt>:strip_insignificant_zeros</tt> - If +true+ removes insignificant zeros after the decimal separator
# (defaults to +false+).
# * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid
# number is given.
# * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
#
# ==== Examples
#
Expand All @@ -183,7 +180,7 @@ def number_to_currency(number, options = {})
# number_to_percentage(1000, :locale => :fr) # => 1 000,000%
# number_to_percentage("98a") # => 98a%
#
# number_to_percentage("98a", :raise => true) # => raise InvalidNumberError
# number_to_percentage("98a", :raise => true) # => InvalidNumberError
def number_to_percentage(number, options = {})
return unless number

Expand Down Expand Up @@ -214,7 +211,7 @@ def number_to_percentage(number, options = {})
# * <tt>:locale</tt> - Sets the locale to be used for formatting (defaults to current locale).
# * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to ",").
# * <tt>:separator</tt> - Sets the separator between the fractional and integer digits (defaults to ".").
# * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid. number is given.
# * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
#
# ==== Examples
#
Expand Down

0 comments on commit 6fca931

Please sign in to comment.