class Pet attr_accessor :name, :age, :gender, :color end class Cat < Pet end class Dog < Pet def bark puts "Woof!" end end a_dog = Dog.new puts a_dog.class