<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>s-uotani-zetakansu</author_name>
  <author_url>https://blog.hatena.ne.jp/s-uotani-zetakansu/</author_url>
  <blog_title>webエンジニアの日常</blog_title>
  <blog_url>https://www.uosansatox.biz/</blog_url>
  <categories>
    <anon>rails</anon>
    <anon>ruby</anon>
  </categories>
  <description>こんにちは、エンジニアのさもです。 仕事で次のような要件のメソッドを実装しました。 配列[1,2,3,4,5,6,7,8,9]がある。 この配列から、指定した数字（実際は検索結果の配列に対して、一つのオブジェクトを指定）を含む周囲5件を抜き出した配列を作る （具体例） 1を指定した場合は、[1,2,3,4,5] 2を指定した場合は、[1,2,3,4,5] 5を指定した場合は、[3,4,5,6,7] 8を指定した場合は、[5,6,7,8,9] 9を指定した場合は、[5,6,7,8,9] 今回は、実装したメソッドの紹介と、Minitestでのテストコードを紹介します。 テスト駆動ではなかったので、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.uosansatox.biz%2Fentry%2F2017%2F11%2F30%2F140203&quot; title=&quot;Rubyでどう書く？配列からターゲットの周囲5件を抜き出す - 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>https://cdn.mogile.archive.st-hatena.com/v1/image/s-uotani-zetakansu/316973853239214550.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-11-30 14:02:03</published>
  <title>Rubyでどう書く？配列からターゲットの周囲5件を抜き出す</title>
  <type>rich</type>
  <url>https://www.uosansatox.biz/entry/2017/11/30/140203</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
