Question: what is the difference between class variable and instance variable in ruby?
Answer: What is the difference between class variables and class instance variables? The main difference is the behavior concerning inheritance: class variables are shared between a class and all its subclasses, while class instance variables only belong to one specific class.