Sha256: 7780af4574d3e26662ba9ea427310a94ea8d51454a2bbcd467fc2c52bb25756a
Contents?: true
Size: 606 Bytes
Versions: 1
Compression:
Stored size: 606 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
name-tamer-0.2.15 | doc/maintenance.rake |