Skip to content

Instantly share code, notes, and snippets.

@sruli
Created January 15, 2013 11:40
Show Gist options
  • Save sruli/4538038 to your computer and use it in GitHub Desktop.
Save sruli/4538038 to your computer and use it in GitHub Desktop.
COLUMN_TYPES = {
:name => column(with(/^name$/i), :transform => :split_name),
:email => column(with(/e\-?mail/i), :transform => :clean_email),
:first_name => column(with(/first/i)),
:last_name => column(with(/last/i)),
:phone => column(with(/phone/i)),
:company => column(with(/company/i)),
:title => column(with(/title/i)),
:address => column(with(/address/i), without(/e\-?mail/i)),
:city => column(with(/city|town/i)),
:state => column(with(/state|province/i)),
:zip => column(with(/zip|postal/i)),
:country => column(with(/country/i)),
:suppressed => column(with(/opt.?out/i), :transform => :non_zero_suppressed)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment