Class variables

Class variables are variables that are available to a particular class. The syntax for this variable is @@. Consider this example:

class MyClass 
@@teams = ["A's", "Tigers"]
end

Though they look simple, you'll rarely use class variables in real-world applications because you can accomplish the same using local or instance variables. Nothing is wrong if you use class variables, but it's not commonly utilized by most developers. In fact, the local and instance variables are likely to make up more than 98 percent of variables in your applications, so it's a good idea to be familiar with them.