2件ヒット
[1-2件を表示]
(0.150秒)
検索結果
-
CSV
:: Table # ==(other) -> bool (9610.0) -
自身の全ての行が比較対象と同じである場合は真を返します。 そうでない場合は偽を返します。
...自身の全ての行が比較対象と同じである場合は真を返します。
そうでない場合は偽を返します。
@param other CSV::Table を指定します。
//emlist[例][ruby]{
require "csv"
row1_1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row1_2 = CSV::Ro......w(["header1", "header2"], ["row1_1", "row1_2"])
row2_2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table1 = CSV::Table.new([row1_1, row1_2])
table2 = CSV::Table.new([row2_1, row2_2])
table1 == table2 # => true
table2 << CSV::Row.new(["header1", "header2"], ["row3_1", "row3_2"])
tabl... -
CSV
:: Table # empty? -> bool (9610.0) -
ヘッダーを除いて、データがないときに true を返します。
ヘッダーを除いて、データがないときに true を返します。
Array#empty? に委譲しています。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b\n", headers: true)
table = csv.read
p table.empty? # => true
table << [1, 2]
p table.empty? # => false
//}
@see Array#empty?