Class: ContactCsv::LookupTables::OutlookCsv
- Inherits:
-
Object
- Object
- ContactCsv::LookupTables::OutlookCsv
- Includes:
- ContactCsv::LookupTables
- Defined in:
- lib/contact_csv/lookup_tables/outlook_csv.rb
Overview
OutlookCsv
Basic class to define the headers and legend for reading Outlook 2003 CSV (Windows) files
Class Method Summary collapse
-
.headers ⇒ Object
Returns an Array of all the headers for a Outlook CSV file.
-
.legend ⇒ Object
Returns a Hash of how the columns map to the Contact attributes.
-
.lookup_table ⇒ Object
Returns a LookupTable object.
Class Method Details
.headers ⇒ Object
Returns an Array of all the headers for a Outlook CSV file
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/contact_csv/lookup_tables/outlook_csv.rb', line 21 def self.headers [ "Title", "First Name", "Middle Name", "Last Name", "Suffix", "Company", "Department", "Job Title", "Business Street", "Business Street 2", "Business Street 3", "Business City", "Business State", "Business Postal Code", "Business Country", "Home Street", "Home Street 2", "Home Street 3", "Home City", "Home State", "Home Postal Code", "Home Country", "Other Street", "Other Street 2", "Other Street 3", "Other City", "Other State", "Other Postal Code", "Other Country", "Assistant's Phone", "Business Fax", "Business Phone", "Business Phone 2", "Callback", "Car Phone", "Company Main Phone", "Home Fax","Home Phone", "Home Phone 2", "ISDN", "Mobile Phone", "Other Fax", "Other Phone", "Pager", "Primary Phone", "Radio Phone", "TTY/TDD Phone", "Telex","Account", "Anniversary", "Assistant's Name", "Billing Information", "Birthday", "Business Address PO Box", "Categories","Children", "Directory Server", "E-mail Address", "E-mail Type", "E-mail Display Name", "E-mail 2 Address", "E-mail 2 Type", "E-mail 2 Display Name", "E-mail 3 Address", "E-mail 3 Type", "E-mail 3 Display Name", "Gender", "Government ID Number", "Hobby", "Home Address PO Box", "Initials", "Internet Free Busy", "Keywords","Language", "Location", "Manager's Name", "Mileage", "Notes", "Office Location", "Organizational ID Number", "Other Address PO Box", "Priority","Private", "Profession", "Referred By", "Sensitivity", "Spouse", "User 1", "User 2", "User 3", "User 4", "Web Page"] end |
.legend ⇒ Object
Returns a Hash of how the columns map to the Contact attributes
10 11 12 13 14 15 16 17 18 |
# File 'lib/contact_csv/lookup_tables/outlook_csv.rb', line 10 def self.legend { 'Title' => :title, 'First Name' => :first_name, 'Middle Name' => :middle_name, 'Last Name' => :last_name, 'E-mail Address' => :email } end |
.lookup_table ⇒ Object
Returns a LookupTable object
112 113 114 |
# File 'lib/contact_csv/lookup_tables/outlook_csv.rb', line 112 def self.lookup_table LookupTable.new(self.headers, self.legend) end |