<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>suzuki86</author_name>
  <author_url>https://blog.hatena.ne.jp/suzuki86/</author_url>
  <blog_title>ほどよいバランス</blog_title>
  <blog_url>https://suzuki86.hateblo.jp/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>下記のような書き方をするとエラーになる。 class A def self.speak say_hello end def say_hello puts &quot;Hello&quot; end end A.speak # undefined local variable or method というエラーが表示される。 self.speakメソッドの中で自分自身のクラスをnewすると呼び出すことができる。 class A def self.speak self.new.say_hello end def say_hello puts &quot;Hello&quot; end end A.speak # Helloと表示される。 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsuzuki86.hateblo.jp%2Fentry%2F2015%2F04%2F11%2F234933&quot; title=&quot;特異メソッドから直接インスタンスメソッドは呼び出せない - ほどよいバランス&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>2015-04-11 23:49:33</published>
  <title>特異メソッドから直接インスタンスメソッドは呼び出せない</title>
  <type>rich</type>
  <url>https://suzuki86.hateblo.jp/entry/2015/04/11/234933</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
