エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Rails 5.2 fetch_values for HashWithIndifferentAccess
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Rails 5.2 fetch_values for HashWithIndifferentAccess
Ruby 2.3 addedfetch_values method to hash. By using fetch_values we are able to get values for mu... Ruby 2.3 addedfetch_values method to hash. By using fetch_values we are able to get values for multiple keys in a hash. capitals = { usa: "Washington DC", china: "Beijing", india: "New Delhi", australia: "Canberra" }capitals.fetch_values(:usa, :india)#=> ["Washington DC", "New Delhi"]capitals.fetch_values(:usa, :spain) { |country| "N/A" }#=> ["Washington DC", "N/A"]Rails 5.2 introduces method fetc