From: Kevin Ballard Date: 2005-10-19T03:42:02+09:00 Subject: Re: The Ruby Way to build an object unless nil? I'm not sure what the ideal is, but this is certainly more terse: def mymethod a = someobjectreference('a') b = a.some_attribute unless a.nil? c = b.some_attribute unless b.nil? c.dosomething unless c.nil? end If any of those are nil, the rest of the statements will evaluate to nil as well.