How to check if a variable is a number or a string in Ruby?
class Object def numeric? Float(self) != nil rescue false end end