るりまサーチ

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.063秒)
トップページ > クエリ:ruby[x] > クエリ:@[x] > 種類:インスタンスメソッド[x] > クエリ:end[x] > クラス:CSV::Row[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

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

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

...ルに変換する必要があります。

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

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

row = CSV::Row.new([:header1, :header2, :header3], [1,...
.... }
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...

CSV::Row#deconstruct -> [object] (20.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, an...
...d rest columns are 2 or more" が出力される
//}

@
see d:spec/pattern_matching#matching_non_primitive_objects...