# Here, I am defining a class Dog with an class variable "@@number_of_feet"# and an instance variable "@color", assuming that all dogs in the world# have the same number of feet but they might differ in color. Or, at least,# this is the general rule.#classDog@@number_of_feet=4definitialize(color)@color=colorenddefnumber_of_feet=(value)@@number_of_feet=valueenddeftell_me_about_youputs"My color is #{@color} and I have #{@@number_of_feet} feet"endend# The next two statements will set the "@color" instance variable to different values# for max and rocky. But both dogs will have the same number of feet, which will be 4,# since when class is initialized the "@@number_of_feet" instance variable takes the value 4.max=Dog.new('black')rocky=Dog.new('brown')max.tell_me_about_you# will print black and 4rocky.tell_me_about_you# will print brown and 4# Now, I am changing the value of the class variable "@@number_of_feet" and I am setting that# to "3". You will see that now all dogs change to have 3 feet.max.number_of_feet=3max.tell_me_about_you# will print black and 3rocky.tell_me_about_you# will print brown and 3