Try to create two instances of MyClass
a = MyClass.new
b = MyClass.new
to see the difference:
Hello
World
World
Code in the class body execute only once – when ruby loads the file. initialize() executes every time you create a new instance of your class.