This post originated from an RSS feed registered with Ruby Buzz
by Piotr Banasik.
Original Post: Ruby class variable scope
Feed Title: T-P-L.com Blog/Ruby
Feed URL: http://t-p-l.com/wordpress/wp-rss2.php?cat=11
Feed Description: My Random Ruby Ramblings
I've come across something interesting in Ruby to watch out for. The short version is: be carefull using @@name variables, because they may not be what you think.
Let's look a sample scenario. You have a User class, and you extend it with diffrent privilages, for example AdminUser, GuestUser.
Since the privilages ...