I would like to combine arrrays @a, @b, and @c into a single array with multiple data elements, for example OpenStruct:
@a = ["my", "foo", "bar"]
@b = ["yan", "can", "cook"]
@c = ["in", "your", "dreams"]
the output would be like:
[
{ :a => "my", :b => "yan", :c => "in" },
{ :a => "foo", :b => "can", :c => "your" },
{ :a => bar, :b => "cook", :c => "dreams" }
]
What is the fastest way to do this? Should I consider another class?
Here is one solution, I am not quite convinced it is the neatest though: