I think I would see my code better if I would ask myself object.not_nil? vs !object.nil?. So my question: Is there really no convenience method for !nil? to sugar things up? Is it in front of my eyes and I cannot see it or am I just missing an important point?
I think I would see my code better if I would ask myself object.not_nil?
Share
How about this?
But the easier thing to do would be to check for the “truthiness” of by testing the variable itself. Since
nilis implicitlyfalseyou can just checkobject.