class MyClass def initialize @my_variable = 'Hello, world!' endendobj = MyClass.newobj.instance_eval { puts @my_variable }