DESCRIPTION
CSV::StringReader -- CSV formatted stream reader.
EXAMPLE
Read CSV lines untill the first column is 'stop'. CSV::Reader.parse(File.open('bigdata', 'rb')) do |row| p row break if !row[0].is_null && row[0].data == 'stop' end
SYNOPSIS
reader = CSV::StringReader.new(string)
ARGS
string: a CSV String to be parsed.
RETURNS
reader: Created instance.
DESCRIPTION
Create instance. To get parse result, see CSV::Reader#each.
# File csv.rb, line 416 def initialize(string, col_sep = ?,, row_sep = nil) @col_sep = col_sep @row_sep = row_sep @dev = string @idx = 0 if @dev[0, 3] == "\xef\xbb\xbf" @idx += 3 end end