Ruby - Inheritance
Given this Ruby code, what will be the output?
class Animal
def sound
'Some sound'
end
end
class Dog < Animal
def sound
super + ' and Bark'
end
end
class Cat < Animal
def sound
super + ' and Meow'
end
end
puts Dog.new.sound
puts Cat.new.sound