obj.class_variable_set(symbol, obj) â obj
Instance Public methods
Sets the class variable names by symbol to object.
1 2 3 4 5 6 7 8 | class Fred @@foo = 99 def foo @@foo end end Fred.class_variable_set(: @@foo , 101 ) #=> 101 Fred. new .foo #=> 101 |
Please login to continue.