I have a question about how the Ruby interpreter assigns variables:
I use this quite often:
return foo if (foo = bar.some_method)
w
You could do return foo||=nil if foo = bar.some_method.
return foo||=nil if foo = bar.some_method