<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>miz_tech</author_name>
  <author_url>https://blog.hatena.ne.jp/miz_tech/</author_url>
  <blog_title>/Users/mizchi/workplace/</blog_title>
  <blog_url>https://miz-tech.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>スーパークラスのメソッドを継承する際の引数で混乱したので、自分なりにまとめてみた。 class Sup attr_reader :x def initialize #引き継がれない @x=4 end def initialize(x) @x=x-3 end end class Sub &lt; Sup attr_reader :y def initialize(y) super @y=y end end obj=Sub.new(6) p obj.x #=&gt; 3 p obj.y #=&gt; 6 引数なしのinitializeを呼んだつもりだったのだが、どうやらsuperは引数をそのまま渡しているみたいだ。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmiz-tech.hatenadiary.org%2Fentry%2F20091028%2F1256665571&quot; title=&quot;Rubyの継承 - /Users/mizchi/workplace/&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>2009-10-28 02:46:11</published>
  <title>Rubyの継承</title>
  <type>rich</type>
  <url>https://miz-tech.hatenadiary.org/entry/20091028/1256665571</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
