<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>E_Mattsan</author_name>
  <author_url>https://blog.hatena.ne.jp/E_Mattsan/</author_url>
  <blog_title>エンジニアのソフトウェア的愛情</blog_title>
  <blog_url>https://blog.emattsan.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>昨日やったことをRubyでも。 実は(ry こんな感じで実装してみた。もうちょとすっきりするんぢゃないだろうか、というモヤモヤした感じが残る。 あと。これはString特化の実装。配列のばあいは別の方法が必要。 コードはGitHubにも置いてあります。 class String def divide_into(n) scan(/.{1,#{(size + n - 1) / n}}/) end end 試してみる。 require './divideInto.rb' p &quot;12345678&quot;.divide_into 3 実行結果。 $ ruby divideIntoTest.rb [&quot;123&quot;,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.emattsan.org%2Fentry%2F20130702%2F1372768342&quot; title=&quot;N個の要素に分割する・Ruby篇 - エンジニアのソフトウェア的愛情&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>2013-07-02 21:32:22</published>
  <title>N個の要素に分割する・Ruby篇</title>
  <type>rich</type>
  <url>https://blog.emattsan.org/entry/20130702/1372768342</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
