Class: CSV::StringReader

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

Instance Method Summary collapse

Methods inherited from Reader

#close, create, #each, parse, #shift

Constructor Details

#initialize(string, fs = ',',, rs = nil) ⇒ StringReader

Returns a new instance of StringReader.



592
593
594
595
596
597
598
599
600
# File 'lib/csv.rb', line 592

def initialize(string, fs = ',', rs = nil)
  @fs = fs
  @rs = rs
  @dev = string
  @idx = 0
  if @dev[0, 3] == "\xef\xbb\xbf"
    @idx += 3
  end
end