<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Python に Generator というのがあります。Ruby では Enumerator でほぼ同じことができますが、引数の与え方がいまひとつよくわかりません。でというわけでもないのですが、勉強のために頑張って Fiber で実装してみました。Generator#args で引数を与えます。複数の引数を取れるのが考えたところです。Genarator#next が終端に達すると、StopIteration 例外を発生させます。Kernel#loop は StopIteration を捕捉します。 Genarator#each を実装しているので、Enumerable モジュールを incl…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2016%2F09%2F29%2F010330&quot; title=&quot;Ruby で Generator の実装 - Camera Obscura&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>2016-09-29 01:03:30</published>
  <title>Ruby で Generator の実装</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2016/09/29/010330</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
