I have an array like this
array = ["My Name", "1905", "more than three words"]
What I would like to do is split each item of the array by its space and then create 1 array with each word, so
["My", "Name", "1905", "more", "than", "three", "words"]
What I have tried so far is
words = []
array.each do { |a| words << a.to_s.split(" ") }
This returns
[["My", "Name"], ["1905"], ["more", "than", "three", "words"]]
But I have multiple arrays within an array. How would I go about achieving
["My", "Name", "1905", "more", "than", "three", "words"]
I'm missing something obvious aren't I?