るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n
  3. rsa n=
  4. openssl n
  5. openssl n=

ライブラリ

検索結果

CSV::Row#[]=(header_or_index, value) (54607.0)

ヘッダの名前かインデックスでフィールドを探し、値をセットします。

...定][ruby]{
require "csv"

row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])

row["header1"] # => "row1_1"
row["header1"] = "updated"
row["header1"] # => "updated"
//}

//emlist[例 ヘッダの index で指定][ruby]{
require "csv"

row = CSV::Row.new(["header1", "header2"], ["row1...
...row = CSV::Row.new(["header1", "header2", "header1"], ["row1_1", "row1_2", "row1_3"])

row # => #<CSV::Row "header1":"row1_1" "header2":"row1_2" "header1":"row1_3">
row["header1", 1] = "updated"
row # => #<CSV::Row "header1":"row1_1" "header2":"row1_2" "header1":"updated">
//}


@see CSV::Row#fiel...