Displaying 1 result from an estimated 1 matches for "b531569a".
2006 Apr 25
2
how can I access a class variable outside of the class???
Hi
we wanted to access a class varaible from outside of
the same class, like
class klass
@@var1
end
we found out we can not use the class variable like
this:
klass.var1 we have to create a class function like
class klass
@@var1
def var1
return @@var1
end
end
If anyone know how to access a class variable directly
without passing by a function???
Thanks you very much