method

class_variable_get

v1_8_7_72 - Show latest stable - Class: Module
class_variable_get(p1)
public

Returns the value of the given class variable (or throws a NameError exception). The @@ part of the variable name should be included for regular class variables

   class Fred
     @@foo = 99
   end

   def Fred.foo
     class_variable_get(:@@foo)     #=> 99
   end