るりまサーチ

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

別のキーワード

  1. _builtin all?
  2. pop delete_all
  3. pop3 delete_all
  4. net/pop delete_all
  5. pop all

ライブラリ

クラス

検索結果

CSV::Row#deconstruct -> [object] (18108.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 co...

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

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

...ruby]{
require "csv"

row = CSV::Row.new([:header1, :header2, :header3], [1, 2, 3])
case row
in { header1: 2.., header2: 2.., header3: 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 col...