5 ways to splat in ruby
Lastly, splat can convert an Array into a Hash. Your Array needs to contain an even number of elements for this to work. If the Array were grouped into pairs, the first element in each pair will become a key in your Hash, and the second element of the pair will be the corresponding value.
5 ways to splat in ruby #ruby #rubydeveloper #rubyonrails https://www.rubyonrails.ba/single/5-ways-to-splat-in-ruby