Ruby - Inheritance
What will be the output of this Ruby code?
class Parent
def greet(name)
"Hello, #{name} from Parent"
end
end
class Child < Parent
def greet(name)
super(name) + " and Child"
end
end
puts Child.new.greet("Alice")