るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.067秒)
トップページ > クエリ:Hash#key[x] > クエリ:new[x] > クエリ:include?[x] > クエリ:select![x] > クエリ:reject![x] > バージョン:2.4.0[x] > クエリ:shift[x] > クエリ:assoc[x] > モジュール:Enumerable[x]

別のキーワード

  1. _builtin slice!
  2. _builtin include?
  3. _builtin reject!
  4. _builtin select!
  5. string slice!

ライブラリ

検索結果

Enumerable#to_h(*args) -> Hash (403.0)

self を [key, value] のペアの配列として解析した結果を Hash にして 返します。

self を [key, value] のペアの配列として解析した結果を Hash にして
返します。

@param args each の呼び出し時に引数として渡されます。

//emlist[例][ruby]{
%i[hello world].each_with_index.to_h # => {:hello => 0, :world => 1}
//}