Ruby - Metaprogramming Fundamentals
What will be the output of this Ruby code?
Parent = Class.new do
def speak
'Parent'
end
end
Child = Class.new(Parent) do
def speak
super + ' Child'
end
end
puts Child.new.speak