Class CSV::IOBuf
In: lib/csv.rb
Parent: StreamBuf

Buffered IO.

EXAMPLE

  # File 'bigdata' could be a giga-byte size one!
  buf = CSV::IOBuf.new(File.open('bigdata', 'rb'))
  CSV::Reader.new(buf).each do |row|
    p row
    break if row[0].data == 'admin'
  end

Methods

close   new   read   terminate  

Public Class methods

[Source]

     # File lib/csv.rb, line 973
973:     def initialize(s)
974:       @s = s
975:       super()
976:     end

Public Instance methods

[Source]

     # File lib/csv.rb, line 978
978:     def close
979:       terminate
980:     end

Private Instance methods

[Source]

     # File lib/csv.rb, line 984
984:     def read(size)
985:       @s.read(size)
986:     end

[Source]

     # File lib/csv.rb, line 988
988:     def terminate
989:       super()
990:     end

[Validate]