Ruby - Metaprogramming Fundamentals
What will be the output of this Ruby code?
MyClass = Class.new do
def greet
"Hi"
end
end
obj = MyClass.new
puts obj.greet