Consider the following code:
@name = 'learning metaprogramming!'
def cap
@name.upcase # Was expecting to require @@name as the scopes are different like in a class
end
cap # => "LEARNING METAPROGRAMMING!"
Can someone explain, how come I am able to access @name, which I suppose should be the class variable of main.