<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osyo-manga</author_name>
  <author_url>https://blog.hatena.ne.jp/osyo-manga/</author_url>
  <blog_title>Secret Garden(Instrumental)</blog_title>
  <blog_url>https://secret-garden.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Ruby でフィボナッチ数列を求めるメタプログラミングを書いてみた。 class Fib def call n __send__ &quot;_#{n}&quot; end def method_missing name, *args n = name[/_(\d+)/, 1].to_i if n &gt; 1 n = call(n - 2) + call(n - 1) end define_singleton_method(name) { n } &amp;&amp; n end end fib = Fib.new 1.upto(55) do |n| print &quot;#{fib.call n} &quot; end # =&gt; 1 1 2 3 5…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2016%2F02%2F20%2F222316&quot; title=&quot;Ruby でメタプログラミング的にフィボナッチ数列を求める - Secret Garden(Instrumental)&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-02-20 22:23:16</published>
  <title>Ruby でメタプログラミング的にフィボナッチ数列を求める</title>
  <type>rich</type>
  <url>https://secret-garden.hatenablog.com/entry/2016/02/20/222316</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
