Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/test-factory/core_ext.rb
Overview
Numeric
Instance Method Summary collapse
-
#groom ⇒ Object
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.
Instance Method Details
#groom ⇒ Object
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 |