lib/condensation/filters/money.rb
# Strips whitespace and any leading symbol (for currency symbols)
#
# All of the following are valid and will be parsed to the same value (100.0)
#
#   "$100"
#   "$100.0"
#   "CA$ 100.0"
#   " 100 \n "
#   "100.00000000000"
#
Strips whitespace and any leading symbol (for currency symbols)
All of the following are valid and will be parsed to the same value (100.0)


Strips whitespace and any leading symbol ( for currency symbols ) All of the following are valid and will be parsed to the same value ( 100 . 0 )
def cents(input)
        format('%0.2f', Integer(input) / 100.0)
      rescue ArgumentError
        nil
      end
def cents ( input ) format ( '%0.2f' , Integer ( input ) / 100.0 ) rescue ArgumentError nil end
Strips whitespace and any leading symbol (for currency symbols)
All of the following are valid and will be parsed to the same value (100.0)
Strips whitespace and any leading symbol ( for currency symbols ) All of the following are valid and will be parsed to the same value ( 100 . 0 )
input
<not_specific>