[rspec-users] class << self considered harmful... really?
avdi at avdi.org
Wed Nov 26 11:39:48 EST 2008
On Wed, Nov 26, 2008 at 8:23 AM, Shot (Piotr Szotkowski) <shot at hot.pl> wrote:
> Such methods have access to the eigenclass's instance variables, and so
> class << self works very nice when working with singletons (like Log or
I've never had trouble accessing class-level instance variables
(@variables) in class methods defined as "def self.foo". In fact I
hardly ever use @@variables, and I never use class << self for
defining class methods.
Developer Blog: http://avdi.org/devblog/
More information about the rspec-users