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

Version Path
name-tamer-0.2.14 doc/maintenance.rake
name-tamer-0.2.13 doc/maintenance.rake
name-tamer-0.2.12 doc/maintenance.rake
name-tamer-0.2.11 doc/maintenance.rake
name-tamer-0.2.10 doc/maintenance.rake
name-tamer-0.2.9 doc/maintenance.rake
name-tamer-0.2.8 doc/maintenance.rake
name-tamer-0.2.7 doc/maintenance.rake
name-tamer-0.2.4 doc/maintenance.rake
name-tamer-0.2.3 doc/maintenance.rake
name-tamer-0.2.2 doc/maintenance.rake
name-tamer-0.2.1 doc/maintenance.rake
name-tamer-0.2.0 doc/maintenance.rake
name-tamer-0.1.9 doc/maintenance.rake
name-tamer-0.1.8 doc/maintenance.rake
name-tamer-0.1.7 doc/maintenance.rake
name-tamer-0.1.6 doc/maintenance.rake
name-tamer-0.1.5 doc/maintenance.rake
name-tamer-0.1.4 doc/maintenance.rake
name-tamer-0.1.3 doc/maintenance.rake