Skip to content

Instantly share code, notes, and snippets.

@mattneary
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save mattneary/4ef7f5b71cec21dc3d68 to your computer and use it in GitHub Desktop.

Select an option

Save mattneary/4ef7f5b71cec21dc3d68 to your computer and use it in GitHub Desktop.
Keep data on new items
master = ['X', 'Y']
def clean(list)
CSV.filter("#{list}.csv") do |row|
not (master.include? row[1])
end
end
['A', 'B', 'C'].each {|file|
clean(file)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment