Class CSV::StringReader
In: lib/csv.rb
Parent: Reader

Methods

get_row   new  

Public Class methods

[Source]

     # File lib/csv.rb, line 592
592:     def initialize(string, fs = ',', rs = nil)
593:       @fs = fs
594:       @rs = rs
595:       @dev = string
596:       @idx = 0
597:       if @dev[0, 3] == "\xef\xbb\xbf"
598:         @idx += 3
599:       end
600:     end

Private Instance methods

[Source]

     # File lib/csv.rb, line 604
604:     def get_row(row)
605:       parsed_cells, next_idx = CSV.parse_row(@dev, @idx, row, @fs, @rs)
606:       if parsed_cells == 0 and next_idx == 0 and @idx != @dev.size
607:         raise IllegalFormatError.new
608:       end
609:       @idx = next_idx
610:       parsed_cells
611:     end

[Validate]