<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>round-rand</author_name>
  <author_url>https://blog.hatena.ne.jp/round-rand/</author_url>
  <blog_title>ランドML</blog_title>
  <blog_url>https://ml-rand-note.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>each：要素を1つずつ取り出してループ reverse_each：逆順にループ each_with_index：要素とインデックスを取り出す each_cons：重複ありでn個の配列に切り出す each_slicek：重複なしでn個の配列に切り出す 参考 each：要素を1つずつ取り出してループ eachメソッドでは配列から1つずつ要素を取り出していきます。 Pythonのfor文、C#のfor_eachなどと同じような感じです。 arr = [1, 2, 3] arr.each do |value| p value end # 1 # 2 # 3 reverse_each：逆順にループ r…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fruby%2Farray-each&quot; title=&quot;【Ruby】配列 繰り返し処理(each, reverse_each, each_with_index, each_cons, each_slice) - ランドML&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>2026-06-30 00:00:00</published>
  <title>【Ruby】配列 繰り返し処理(each, reverse_each, each_with_index, each_cons, each_slice)</title>
  <type>rich</type>
  <url>https://ml-rand-note.hatenablog.com/entry/ruby/array-each</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
