<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubytips86</author_name>
  <author_url>https://blog.hatena.ne.jp/rubytips86/</author_url>
  <blog_title>Ruby Tips!</blog_title>
  <blog_url>https://rubytips86.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>配列にある要素が含まれているかを判定するにはArray#include?を使う。このメソッドは引数で与えた要素と==で等しい要素が存在する場合にtrueを返し、存在しない場合はfalseを返す。 p [1, 2, 3].include?(2) #=&gt; true p [1, 2, 3].include?(4) #=&gt; false 何処に含まれているかも調べたい場合はArray#indexを使う。このメソッドは引数で与えた要素と==で等しい要素を最初に見つけたインデックスを返し、要素が存在しなければnilを返す。 p [1, 2, 3].index(2) #=&gt; 1 p [1, 2, 3].ind…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubytips86.hatenablog.com%2Fentry%2F2014%2F04%2F03%2F120427&quot; title=&quot;配列から要素を検索する - Ruby Tips!&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>2014-04-03 12:04:27</published>
  <title>配列から要素を検索する</title>
  <type>rich</type>
  <url>https://rubytips86.hatenablog.com/entry/2014/04/03/120427</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
