Skip to content
instance method

Module#remove_class_variable

(::interned arg0) -> untyped
remove_class_variable(sym) → obj

Removes the named class variable from the receiver, returning that variable’s value.

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

produces:

Example
99
nil
See also #refinements #remove_const #refine #remove_method also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0