Reputation: 171
I have three ruby scripts say, A.rb
, B.rb
and Call.rb
.
I have a class variable @@classvar
in Call.rb
and I am initializing it like,
@@classvar=[:A,:B]
.
What does the above statement actually do?
Upvotes: 1
Views: 90
Reputation: 490263
@@classvar=[:A,:B]
It means, set class method, or static method with name classvar
as an array with two symbols, :A
and :B
.
Upvotes: 2