るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.210秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

クラス

検索結果

CSV#header_row? -> bool (54349.0)

次に読み込まれる行が、ヘッダである場合に真を返します。 そうでない場合は、偽を返します。

...に読み込まれる行が、ヘッダである場合に真を返します。
そうでない場合は、偽を返します。

//emlist[例][ruby]{
require "csv"

csv
= CSV.new("header1,header2\nrow1_1,row1_2", headers: true)
csv
.header_row? # => true
csv
.readline
csv
.header_row? # => false
//}...

CSV::Row#header_row? -> bool (54349.0)

ヘッダ行であれば真を返します。そうでなければ偽を返します。

...ダ行であれば真を返します。そうでなければ偽を返します。

//emlist[例][ruby]{
require "csv"

header_row = CSV::Row.new(["header1", "header2"], [], true)
row = CSV::Row.new(["header1", "header2"], [1, 2])
header_row.header_row? # => true
row.header_row? # => false
//}...