I have an array of strings:
names = ['log_index', 'new_index']
What I want to do is to create variables from the names:
names.each { |name| name = [] } # obviously it does not do what I want
Those variables are not declared before anywhere in the code.
How could I do that?
indexarray come from? Why don't you just assign the variables manually vialog_index = []andnew_index = []? What are you trying to achieve?