Hello all,

I have this :

def mymethod
  a = someobjectreference('a')
  if a.nil?
    return nil
  end
  b = a.someattribute_might_be_nil
  if b.nil?
    return nil
  end
  c = b.someattribute_might_be_nil
  if c.nil?
    return nil
  end
  c.dosomething
end

What is the ruby way to handle the if .nil? ladder created here?

Thanks.
Peter Fitzgibbons