method

new

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: CSV::Row
new(headers, fields, header_row = false) public

Construct a new CSV::Row from headers and fields, which are expected to be Arrays. If one Array is shorter than the other, it will be padded with nil objects.

The optional header_row parameter can be set to true to indicate, via CSV::Row.header_row?() and CSV::Row.field_row?(), that this is a header row. Otherwise, the row is assumes to be a field row.

A CSV::Row object supports the following Array methods through delegation:

  • empty?()

  • length()

  • size()

Show source
Register or log in to add new notes.