るりまサーチ

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.113秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:t[x] > クエリ:r[x] > クエリ:ref[x] > ライブラリ:csv[x] > クエリ:deconstruct_keys[x]

別のキーワード

  1. rexml/document ref
  2. fiddle ref
  3. pointer ref
  4. entity ref
  5. objectspace _id2ref

クラス

検索結果

CSV::Row#deconstruct_keys(keys) -> Hash (30310.0)

パターンマッチに使用するヘッダの名前と値の Hash を返します。

...@param keys パターンマッチに使用するヘッダの名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。

//emlist[例][ruby]{
r
equire "csv"

r
ow = CSV::Row.new([:header1, :header2, :header3], [1, 2, 3])
case row
in { header1: 2.., header2:...
...eader3: 2.. }
puts "all 2 or more"
in { header1: ...2, header2: 2.., header3: 2.. }
puts "first column is less than 2, and rest columns are 2 or more"
end
#=> "first column is less than 2, and rest columns are 2 or more" が出力される
//}

@see d:spec/pattern_matching#matching_non_primitive...
..._objects...