instance method Module#class_variable_get
class_variable_get(name) -> object
-
クラス/モジュールに定義されているクラス変数 name の値を返します。
class Fred @@foo = 99 end def Fred.foo class_variable_get(:@@foo) end p Fred.foo #=> 99
class Module
class_variable_get(name) -> object
クラス/モジュールに定義されているクラス変数 name の値を返します。
class Fred @@foo = 99 end def Fred.foo class_variable_get(:@@foo) end p Fred.foo #=> 99