> Also, if you haven't seen this before, don't let it frighten you:
>
> @count ||= 0
>
> That's providing a default value for @count. When you execute that code, it
> checks whether @count has a positive value -- if it doesn't, it assigns 0 to
> @count. Either way, the (possibly new) value of @count will be returned.

Does it?  I thought this would only give @count the value 0 if it
previously had the value nil or false, and that if the count was -7
that would remain.  Did you mean "@count has a true value" instead of
"@count has a positive value"?

irb(main):001:0> @count = -7
=> -7
irb(main):002:0> @count ||= 0
=> -7
irb(main):003:0> @count = nil
=> nil
irb(main):004:0> @count ||= 0
=> 0

C:\Documents and Settings\paul.smith>ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]
-- 
Paul Smith
http://www.nomadicfun.co.uk

paul / pollyandpaul.co.uk