On Wed, Nov 26, 2008 at 8:23 AM, Shot (Piotr Szotkowski) <[EMAIL PROTECTED]> 
wrote:

> If you don't use class << self, you have to work on class variables and
> you can't use the attr_* shorthands to access the singleton's variables.

Actually, instance variables in a "def self.*" method still refer to
the singleton object.  The body of that method is treated just like a
method in "class << self".  You just don't get a chance, as you say,
to make accessors with "attr_*", since that goes outside your method
definitions.

Peter
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to