Sha256: 2a0b726753c89a50245b39f44950a9a208830c5db2ab97b0101a8907fb169c96
Contents?: true
Size: 683 Bytes
Versions: 25
Compression:
Stored size: 683 Bytes
Contents
# encoding: utf-8 require 'csv' desc 'Build prefixes and suffixes' task :adfixes do pp = [] po = [] sp = [] so = [] CSV.foreach("#{File.dirname(__FILE__)}/prefixes.csv", headers:true) do |row| if row[2] == 'person' pp << row[0] else po << row[0] end end CSV.foreach("#{File.dirname(__FILE__)}/suffixes.csv", headers:true) do |row| if row[2] == 'person' sp << row[0] else so << row[0] end end puts "'" + pp.join("', '") + "'" puts "'" + po.join("', '") + "'" puts "'" + sp.join("', '") + "'" puts "'" + so.join("', '") + "'" end
Version data entries
25 entries across 25 versions & 1 rubygems