RosettaCodeData/Task/Inheritance-Single/Ruby/inheritance-single.rb
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

22 lines
315 B
Ruby

class Animal
#functions go here...
def self.inherited(subclass)
puts "new subclass of #{self}: #{subclass}"
end
end
class Dog < Animal
#functions go here...
end
class Cat < Animal
#functions go here...
end
class Lab < Dog
#functions go here...
end
class Collie < Dog
#functions go here...
end