I’m confused about a couple things.
If you “realize that you’ve overwritten a method or attribute defined in that class’ base class” as the lesson says, wouldn’t you simply delete the method or attribute in the derived class instead of using the keyword
How come when the following code is run . . .
class Creature def initialize(name) @name = name end def fight return "Punch to the chops!" end end class Dragon < Creature def fight puts "instead of breathing fire..." super end end
. . . it puts . . .
instead of breathing fire... Punch to the chops!
. . . to the console when the
fight method has not been called AND the superclass’ fight method does not contain a