I have this code:
require '/octokit'
require '/csv'
CSV.open("node_attributes.csv", "wb") do |csv|
csv << [Octokit.user "rubinius"]
csv << [Octokit.user "sferik"]
# add one more request for each piece of information needed
end
However, it would be smoother if I could have it iterate through a list and call the Octokit.user
command for every name on the list, e.g.
list = ["rubinius, "sferik"]
How can I convert my clunky function into a nice iterator that goes through the list?
Inside your block do this: