<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>snoozer-05</author_name>
  <author_url>https://blog.hatena.ne.jp/snoozer-05/</author_url>
  <blog_title>Standing on the shoulder of giants</blog_title>
  <blog_url>https://snoozer-05.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
    <anon>パターン</anon>
  </categories>
  <description>インスタンス変数と同じ名前の変数の値を返すメソッドを作りましょう。 インスタンス変数に関するパターンです。 Indirect Variable Accessで使用するアクセサのうち、参照を行うものをGetting Methodといいます。 class Point attr_accessor :x, :y def initialize(x, y) @x = x @y = y end end point = Point.new(10, 5) point.x # =&gt; 10 Getting Methodのみを実現したい場合は、attr_readerを使用します。 class Point attr_r…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsnoozer-05.hatenadiary.org%2Fentry%2F20070821%2F1187701436&quot; title=&quot;Getting Method - Standing on the shoulder of giants&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>2007-08-21 22:03:56</published>
  <title>Getting Method</title>
  <type>rich</type>
  <url>https://snoozer-05.hatenadiary.org/entry/20070821/1187701436</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
