Mega Code Archive

 
Categories / Ruby / Reflection
 

Use === to check the class type

x = 1                    # This is the value we're working with Numeric === x            # true: x is_a Numeric