I see that Ruby has the following variables: - global variables (represented by $variable_name) - class variables (represented by @@variable_name) - instance variables (represented by @variable_name) and - local variables (represented by variable_name or _variable_name)
Occasionally I see the following in the rails source code:
class SomeClass @var end
Here what exactly @var represent and what do you call it, metaclass variable? Also whats the advantage of using this kind of variables?