I googled that there is an is_a? function to check whether an object is an integer or not.
is_a?
But I tried in rails console, and it doesn\'t work.
I
i used a regular expression
if a =~ /\d+/ puts "y" else p 'w' end