Permalink
Browse files

[ci skip] Correct output and use valid options of number helpers

  • Loading branch information...
1 parent 4d209b5 commit 9bb0f1e08a0c433d7581aecb1c5764c5fd540fa9 Akshay Vishnoi committed Jun 10, 2014
@@ -272,7 +272,7 @@ def number_with_precision(number, options = {})
# <tt>:strip_insignificant_zeros</tt> to +false+ to change
# that):
#
- # number_to_human_size(1234567890123, precision: 5) # => "1.1229 TB"
+ # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB"
# number_to_human_size(524288000, precision: 5) # => "500 MB"
def number_to_human_size(number, options = {})
delegate_number_helper_method(:number_to_human_size, number, options)
@@ -346,7 +346,7 @@ def number_to_human_size(number, options = {})
# Non-significant zeros after the decimal separator are stripped
# out by default (set <tt>:strip_insignificant_zeros</tt> to
# +false+ to change that):
- # number_to_human(12345012345, significant_digits: 6) # => "12.345 Billion"
+ # number_to_human(12345012345, significant: false) # => "12.345 Billion"
# number_to_human(500000000, precision: 5) # => "500 Million"
#
# ==== Custom Unit Quantifiers
@@ -236,7 +236,7 @@ def number_to_rounded(number, options = {})
# Non-significant zeros after the fractional separator are stripped out by
# default (set <tt>:strip_insignificant_zeros</tt> to +false+ to change that):
#
- # number_to_human_size(1234567890123, precision: 5) # => "1.1229 TB"
+ # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB"
# number_to_human_size(524288000, precision: 5) # => "500 MB"
def number_to_human_size(number, options = {})
NumberToHumanSizeConverter.convert(number, options)
@@ -309,7 +309,7 @@ def number_to_human_size(number, options = {})
# out by default (set <tt>:strip_insignificant_zeros</tt> to
# +false+ to change that):
#
- # number_to_human(12345012345, significant_digits: 6) # => "12.345 Billion"
+ # number_to_human(12345012345, significant: false) # => "12.345 Billion"
# number_to_human(500000000, precision: 5) # => "500 Million"
#
# ==== Custom Unit Quantifiers

0 comments on commit 9bb0f1e

Please sign in to comment.