mercredi 17 août 2016

ruby merge variables to test for all present?

Is there a way to true up this operation and make it cleaner?

def testvars?
  var1.present? && var2.present? && var3.present?
end

There has to be a better way...

Aucun commentaire:

Enregistrer un commentaire