Sha256: 280ec34a2fcd35e20a970b475063298fe6cdc17ab2fc67abc805617bff95c430
Contents?: true
Size: 501 Bytes
Versions: 1
Compression:
Stored size: 501 Bytes
Contents
module Clienteer module Sanitizer class Name def process(row) names = [row[:raw].first_name, row[:raw].last_name] names = names.compact.join(" ").split(" ") if names.compact.length == 1 if names.all? {|n| proper? n } return row else row[:reason] = "names not valid" $skipped_people << row return nil end end def proper?(name) return false if name.match /\d/ end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
clienteer-1.5.3 | lib/clienteer/sanitizers/name.rb |