Closed vinbarnes closed 10 years ago
Honestly, it was a poor choice. At some point, it seemed plausible that someone might want to pull data out in float form, including data that was initially a string which would have a 0.0 value in float form. This method was initially created with that problem fresh in my mind; this seemed clearer than a regex solution. I've updated it to use regex.
Can you explain why you chose the logic behind this method? https://github.com/morganwildermuth/LPCodingChallenge/blob/master/string_class_methods.rb#L10-L12