readlines

readlines(*args) Class Public methods Alias for ::read.

table

table(path, options = Hash.new) Class Public methods A shortcut for: CSV.read( path, { headers: true, converters: :numeric, header_converters: :symbol }.merge(options) )

<<

<<(row) Instance Public methods The primary write method for wrapped Strings and IOs, row (an Array or CSV::Row) is converted to CSV and appended to the data source. When a CSV::Row is passed, only the row's fields() are appended to the output. The data source must be open for writing. add_row puts

add_row

add_row(row) Instance Public methods Alias for: <<

convert

convert( name )convert { |field| ... }convert { |field, field_info| ... } Instance Public methods You can use this method to install a CSV::Converters built-in, or provide a block that handles a custom conversion. If you provide a block that takes one argument, it will be passed the field and is expected to return the converted value or the field itself. If your block takes two arguments, it will also be passed a CSV::FieldInfo Struct, containing details about the field. Again,

converters

converters() Instance Public methods Returns the current list of converters in effect. See ::new for details. Built-in converters will be returned by name, while others will be returned as is.

each

each() Instance Public methods Yields each row of the data source in turn. Support for Enumerable. The data source must be open for reading.

force_quotes?

force_quotes?() Instance Public methods Returns true if all output fields are quoted. See ::new for details.

gets

gets() Instance Public methods Alias for: shift

header_convert

header_convert( name )header_convert { |field| ... }header_convert { |field, field_info| ... } Instance Public methods Identical to #convert, but for header rows. Note that this method must be called before header rows are read to have any effect.