I got Hello by two ways:
class MyClass $my_variable = "Hello!" end puts $my_variable
And the second one that shows that decared as a local variable with $ can work not from inside a class as it was explained in lesson, and this is not just a local variable so on if it works on it:
$my_variable = "Hello!" class MyClass puts $my_variable end
But why declared before the class MyClass a global variable named my_variable doesn't work on it? Should not it be available anywhere? What I do not understand? I fill like the explanation of the lesson is not really clear.
my_variable = "Hello!" class MyClass puts my_variable end