new(array_of_rows) -> CSV::TableRuby 1.9.3 から[permalink][rdoc][edit]-
自身を初期化します。
全ての行が同じヘッダを持つことを仮定しています。
- [PARAM]
array_of_rows: - CSV::Row のインスタンスの配列を指定します。
require "csv" row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"]) row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"]) table = CSV::Table.new([row1, row2]) p table.to_a # => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]] - [PARAM]