<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubyo</author_name>
  <author_url>https://blog.hatena.ne.jp/rubyo/</author_url>
  <blog_title>rubyo (るびお) の日記</blog_title>
  <blog_url>https://rubyo.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>ruby には alias 式でメソッド、演算子、グローバル変数、正規表現後方参照の別名を作ることができるようです。Adapter パターン を Ruby っぽくするために alias を使って書き替えてみます。 #!/usr/local/bin/ruby class Banner def initialize(string) @string = string end def show_with_paren puts &quot;(#@string)&quot; end def show_with_aster puts &quot;*#@string*&quot; end end class PrintBanner &lt; Banner…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyo.hatenadiary.org%2Fentry%2F20060406%2F1144329955&quot; title=&quot; alias を使った Adapter パターン - rubyo (るびお) の日記&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>2006-04-06 22:25:55</published>
  <title> alias を使った Adapter パターン</title>
  <type>rich</type>
  <url>https://rubyo.hatenadiary.org/entry/20060406/1144329955</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
