class Animal attr_accessor :size attr_accessor :name attr_accessor :legs def initialize(size, legs, name) @size = size @legs = legs @name = name end def speak puts "Here's a sound" end def walk (distance) puts "I walked #{distance} miles" end end class Dog < Animal def speak super puts "Woof" end end #Dog.new(10,4, "Spot").speak class Cat < Animal def walk puts "Ugh do I have to?" super #super(0) end end #Cat.new(4,4,"scout").walk class Cat2 < Animal def walk(distance) puts "Ugh do I have to?" super end end #Cat2.new(4,4,"scout").walk 5 class Cat3 < Animal def initialize puts "I'm making a cat" super end end #Cat3.new.walk(5) class Cat4 < Animal def initialize puts "I'm making a cat with some defaults" super 4,4,"generic name" end def walk (distance) speak end end Cat4.new.walk(5)