<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>maeshima</author_name>
  <author_url>https://blog.hatena.ne.jp/maeshima/</author_url>
  <blog_title>maeshimaの日記</blog_title>
  <blog_url>https://maeshima.hateblo.jp/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>似たようなメソッド群をどのようにリファクタリングするかという課題に対して、動的ディスパッチ＆動的メソッドと method_missing の二つの手段で解決をはかる話。 ゴーストメソッド作成時の Object#respond_to? と Object#methods method_missing でゴーストメソッドを作った場合、respond_to? の結果が false になる。また、Object#methods にも入らない。適宜必要な場合はそれぞれのメソッドをオーバライドしてやる必要がある。 Module#const_missing method_missingほどではないけれど、覚えて…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmaeshima.hateblo.jp%2Fentry%2F20110607%2F1307453562&quot; title=&quot;メタプログラミングRuby 第2章 - maeshimaの日記&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>2011-06-07 22:32:42</published>
  <title>メタプログラミングRuby 第2章</title>
  <type>rich</type>
  <url>https://maeshima.hateblo.jp/entry/20110607/1307453562</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
