Skip to content

Instantly share code, notes, and snippets.

@roadev
Last active Sep 14, 2018
Embed
What would you like to do?
CSV.open("file.csv", "wb") do |csv|
csv << ["Name", "Phone"]
people = Person.by_role("assistant").by_gender("f").by_days("vs")
people.each do |p|
p.phone[5..9] = "xxxxx"
csv << [p.name, p.phone]
end
people = Person.by_role("assistant").by_gender("f").by_days("s")
people.each do |p|
csv << [p.name, p.phone]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment