Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. class Data_Quiz
  2. attr_accessor :Name, :Company, :Address, :City, :Email, :City, :Phone
  3.  
  4. end
  5.  
  6. require 'CSV'
  7.  
  8. items = []
  9.  
  10. CSV.foreach("./data.csv", headers: true) do |row|
  11. items << row
  12. end
  13.  
  14. p items
  15.  
  16. [#<CSV::Row "Name":"Mr. Tito Larkin" "Company":"Ledner-Blanda" "Address":"139 Lesly Bypass" "City":"Arturochester" "Email":"alexzander@yost.biz" "City":"New Gabrielshire" "Phone":"878.936.6868 x3791">, #<CSV::Row "Name":"Ricardo Corwin" "Company":"Volkman-Keebler" "Address":"83713 Duane Streets" "City":"East Cierra" "Email":"jeie@cremin.biz" "City":"Bethelville" "Phone":"973-520-6771 x2219">, #<CSV::Row "Name":"Emilie Bartell" "Company":"Gutmann, Lehner and Koelpin" "Address":"5102 Annamarie Pine" "City":"West Rae" "Email":"horacio@spencerkoelpin.name" "City":"Coraburgh" "Phone":"507.978.7189 x6592">, #<CSV::Row "Name":"Maegan Ryan DVM" "Company":"Baumbach and Sons" "Address":"980 Cecile Expressway" "City":"Koelpinbury" "Email":"aliya.ebert@shields.us" "City":"North Amy" "Phone":"(407) 661-2576 x5877">, #<CSV::Row "Name":"Lamar Boehm" "Company":"Smitham, Buckridge and Flatley" "Address":"867 Shanelle Squares" "City":"Bashirianmouth" "Email":"jenifer@krajcikhaley.org" "City":"West Coltonton" "Phone":"283.440.2426 x1640">, #<CSV::Row "Name":"Christelle Howe" "Company":"McGlynn LLC" "Address":"3147 Braden Shoal" "City":"Port Gabriella" "Email":"leila@bernhard.net" "City":"Tristianmouth" "Phone":"(941) 351-7123">, #<CSV::Row "Name":"Antone Bruen" "Company":"Hammes, Smitham and Hills" "Address":"46859 Kemmer Lights" "City":"Port Laurianne" "Email":"jeanie_king@collins.biz" "City":"Stromanville" "Phone":"859-872-3628">, #<CSV::Row "Name":"Hulda Monahan" "Company":"Hane LLC" "Address":"99398 Jacobson Drive" "City":"North Rogeliostad" "Email":"isaias_renner@haneromaguera.info" "City":"Dejaborough" "Phone":"252.920.3265 x9760">, #<CSV::Row "Name":"Roger Cummerata Jr." "Company":"Kirlin Inc" "Address":"7861 Lee Gateway" "City":"Goodwinbury" "Email":"douglas_greenholt@emmerichjohnson.name" "City":"North D'angelo" "Phone":"980.865.9703">, #<CSV::Row "Name":"Tom Gottlieb" "Company":"Nitzsche LLC" "Address":"81593 Kip Turnpike" "City":"Port Janieburgh" "Email":"kevon.effertz@torp.info" "City":"Harberville" "Phone":"941-808-8821 x7978">]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement