method

remove_class_variable

v2_6_3 - Show latest stable - Class: Module
remove_class_variable(p1)
public

Removes the definition of the sym, returning that constant’s value.

class Dummy
  @@var = 99
  puts @@var
  remove_class_variable(:@@var)
  p(defined? @@var)
end

produces:

99
nil