On 25 Nov 2008, at 17:54, Mark Wilden wrote:

On Tue, Nov 25, 2008 at 8:54 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:

Surely, as soon as they scroll off the screen, it's time to factor that code off into a module or class of its own though?

That's assuming there are a lot of class methods. There might be only one, but if that 'class << self' is off the screen, there's the potential for confusion (among noobs and gurus alike). In many if not most cases I've seen, there were no counterbalancing benefits.

I don't understand. If it's off the screen, it's off the screen, whether it's defined using self.foo or class << self; def foo; end;

What have I missed?



For more, see The Ruby Programming Language for their take.

I didn't know about that book! Cheers for the recommendation :)



///ark

_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to