<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>diskogs</author_name>
  <author_url>https://blog.hatena.ne.jp/diskogs/</author_url>
  <blog_title>diskogs's diary</blog_title>
  <blog_url>https://diskogs.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>rubyのクラスマクロとか調べてたら出てきたので自分メモ用に書きます。素人ですみません。 object.send(name,*args) レシーバ(object)の持っているメソッドを呼び出す 第1引数nameには、メソッド名をシンボルか文字列で渡す メソッドに引数を渡したいときは、第2引数args以降に引数を並べる 戻り値は、呼び出したメソッドの戻り値が変える sendが再定義された場合に備えて、別名の __send__ がある class MyClass def hoge(n = nil) n ? Array.new(n, &quot;hoge&quot;) : &quot;hoge!&quot; end end mc = My…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdiskogs.hatenablog.com%2Fentry%2F2014%2F05%2F22%2F013510&quot; title=&quot;sendメソッド - diskogs&amp;#39;s diary&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>2014-05-22 01:35:10</published>
  <title>sendメソッド</title>
  <type>rich</type>
  <url>https://diskogs.hatenablog.com/entry/2014/05/22/013510</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
