<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>require 'delegate' class MyArray &lt; DelegateClass(Array) def initialize(*args, &amp;bk) super(Array.new(*args, &amp;bk)) end def to_s join('_') end end a = MyArray.new(5) {rand(5)} p a #=&gt;[4, 2, 3, 2, 4] p a.to_s #=&gt;&quot;4_2_3_2_4&quot; MyArray クラスは（リテラルがない以外）Array とまったく同様に使うことができます。新しいメソッドを作ったりインスタンス変数を定義したりしても、移譲なの…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2017%2F08%2F08%2F012559&quot; title=&quot;組み込みクラスのすべてを移譲する（Ruby） - Camera Obscura&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>2017-08-08 01:25:59</published>
  <title>組み込みクラスのすべてを移譲する（Ruby）</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2017/08/08/012559</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
