1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# automatically allow string to remove $ and , from values
# before converting to numerics also parse "k" into "000"
alias old_to_f to_f
alias old_to_i to_i
self.gsub(/[$,]/,"").gsub(/k$/i,"000").old_to_i
end
self.gsub(/[$,]/,"").gsub(/k$/i,"000").old_to_f
end
end
|
