Concept Flow - Type checking with .class and .is_a?
Start with an object
Check object.class
Compare with a class
Action if exact class
+--No-->
Check object.is_a?(Class)
Action if object is instance or subclass
Action if not matching type
End
We first check the exact class of an object using .class, then check if it is an instance of a class or its subclass using .is_a?.