<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tkman</author_name>
  <author_url>https://blog.hatena.ne.jp/tkman/</author_url>
  <blog_title>ねこだよ</blog_title>
  <blog_url>https://tkman.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>メソッドの戻り値が一番最後の変数 慣れれば便利なんだけど、たまに混乱する。 def to_gif unless @image.format == &quot;GIF&quot; @image.format = &quot;GIF&quot; end end なんのこたない、RMagickを使ったメソッドなんだけど、これの戻り値の期待値は元の@imageだった。けど、何度やってもStringクラスが返ってくるわけです。そりゃそうだ。@image.formatが返ってきてるんだもん。根本的な所がまだあやふやな気がしてならない。早いとこ克服しないと。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftkman.hatenadiary.org%2Fentry%2F20100428%2F1272425057&quot; title=&quot;メソッドの戻り値に混乱しない - ねこだよ&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>2010-04-28 12:24:17</published>
  <title>メソッドの戻り値に混乱しない</title>
  <type>rich</type>
  <url>https://tkman.hatenadiary.org/entry/20100428/1272425057</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
