<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tomotomo1129</author_name>
  <author_url>https://blog.hatena.ne.jp/tomotomo1129/</author_url>
  <blog_title>Web開発における知見共有系ページ</blog_title>
  <blog_url>https://job-info.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Rubyのinjectとは もう少し複雑な例 injectの引数 Rubyのinjectとは injectメソッドは、RubyのEnumerableモジュールで提供されており、要素の集合に対して畳み込み操作を行うためのメソッドです。 injectはreduceとも呼ばれ、コレクション内の全ての要素を順番に処理し、1つの結果にまとめることができます。基本的な使い方は次の通りです： # 配列の要素の合計を計算する例 numbers = [1, 2, 3, 4, 5] sum = numbers.inject(0) { |accumulator, number| accumulator + numb…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjob-info.hateblo.jp%2Fentry%2F2024%2F08%2F23%2F201513&quot; title=&quot;Rubyのinjectとは - Web開発における知見共有系ページ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-08-23 20:15:13</published>
  <title>Rubyのinjectとは</title>
  <type>rich</type>
  <url>https://job-info.hateblo.jp/entry/2024/08/23/201513</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
