るりまサーチ

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.033秒)
トップページ > クエリ:object[x] > クエリ:>[x] > クエリ:first[x] > クラス:CSV::Row[x]

別のキーワード

  1. objectspace each_object
  2. _builtin each_object
  3. object send
  4. object to_enum
  5. object enum_for

ライブラリ

検索結果

CSV::Row#deconstruct -> [object] (214.0)

パターンマッチに使用する行の値の配列を返します。

...//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2", "header3"], [1, 2, 3])
case row
in [2.., 2.., 2..]
puts "all 2 or more"
in [...2, 2.., 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...