<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mas-higa</author_name>
  <author_url>https://blog.hatena.ne.jp/mas-higa/</author_url>
  <blog_title>ひがきの日記</blog_title>
  <blog_url>https://mas-higa.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>いつも「何かそういうメソッドあったはず」と思ってるりまを調べなおすことになるのでメモ。 Enumerable#each_cons 順番に n 個ずつ取り出す。 marunouchi = ['方南町', '中野富士見台', '中野新橋', '中野坂上'] marunouchi.each_cons(2).to_a # &gt;&gt; [[&quot;方南町&quot;, &quot;中野富士見台&quot;], # &gt;&gt; [&quot;中野富士見台&quot;, &quot;中野新橋&quot;], # &gt;&gt; [&quot;中野新橋&quot;, &quot;中野坂上&quot;]] Array に経路が入っていて from-to を順番に取り出す場合などに便利。 Enumerable#each_slice n 個ずつに分割…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmas-higa.hatenadiary.org%2Fentry%2F20100410%2F1270903865&quot; title=&quot;覚えておくと便利な Array のメソッド - ひがきの日記&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>2010-04-10 21:51:05</published>
  <title>覚えておくと便利な Array のメソッド</title>
  <type>rich</type>
  <url>https://mas-higa.hatenadiary.org/entry/20100410/1270903865</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
