Class: CSV

Inherits:
Object
  • Object
show all
Defined in:
lib/csv/csv.rb

Defined Under Namespace

Classes: Row, Table

Class Method Summary collapse

Class Method Details

.example_dataObject



5
6
7
8
# File 'lib/csv/csv.rb', line 5

def self.example_data
  data = "id,firstname,lastname\n1,One,One\n2,Two,Two\n4,Four,Four\n5,Five,Five"
  CSV.parse(data, {:col_sep => ',', :headers => true})
end