<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tomomii</author_name>
  <author_url>https://blog.hatena.ne.jp/tomomii/</author_url>
  <blog_title>Words fly away, the written letter remains. </blog_title>
  <blog_url>https://tomomii.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>復習</anon>
  </categories>
  <description>配列を繰り返す場合。 以下のような場合は、配列の要素すべてにアクセスする方法が必要です。 配列の要素をすべて表示したいとき 配列の要素のうち ある条件に当てはまる要素をについて××メソッドを、当てはまらない要素については△△メソッドを適用させたい こんなとき、Rubyではeachメソッドが利用できます :配列.each{|変数| 繰り返したい処理 } eachのうしろ { } で囲まれている部分をブロックという。 実行 配列の要素をすべて表示 name= ['スライム', 'キメラ', 'メタルスライム', 'まほうつかい', 'ばくだん岩'] name.each{|n| puts n } オ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftomomii.hatenablog.com%2Fentry%2F20110111%2Fp1&quot; title=&quot;配列と繰り返し - Words fly away, the written letter remains. &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>2011-01-11 00:00:00</published>
  <title>配列と繰り返し</title>
  <type>rich</type>
  <url>https://tomomii.hatenablog.com/entry/20110111/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
