What should be the logic to determine whether object is interger,float or string if the object is given as the input by the user?
If I understand correctly, you want to “guess” what type some data is that a user provided? The best way would probably be to use a regular expression. Otherwise, maybe only have “allowed” values and then you can more easily match them up.
foo = "bar" case foo when String puts "I'm a string" else puts "Bad input" end
Hi! I have a project for Edu Birdie, and I need some materials on Ruby. Can you suggest some?
I would recommend you to take a look here:
If you need something specific, please let me know.