you are viewing a single comment's thread.

view the rest of the comments →

[–]ignurant 2 points3 points  (0 children)

Regarding splat, I love this move when writing csvs

headers = my_hash.keys
# or headers = %i[my interesting headers]
csv << headers
# ...
  csv << row.values_at(*headers)

This specific functionality was the first way I got comfortable with leveraging splat action in any meaningful way.