Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/test-factory/core_ext.rb

Overview

Numeric

Instance Method Summary collapse

Instance Method Details

#groomObject

Used to remove commas and dollar signs from long number strings, then converting the result to a Float so that it can be used in calculations.



129
130
131
# File 'lib/test-factory/core_ext.rb', line 129

def groom
  self.gsub(/[$,]/,'').to_f
end