dimanche 12 janvier 2020

How to use i% to create & assign symbols in one line?

The following code is resulting in an error:

    %i[@date @doctor @patient] = date, doctor, patient

However, this works:

    @date, @doctor, @patient = date, doctor, patient

How do I use %i to create the symbols and assign them values on the same line?

Aucun commentaire:

Enregistrer un commentaire