<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinkufencer</author_name>
  <author_url>https://blog.hatena.ne.jp/shinkufencer/</author_url>
  <blog_title>コード日進月歩</blog_title>
  <blog_url>https://shinkufencer.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Tips</anon>
  </categories>
  <description>このエントリはRubyのAdventCalendar2021の13日目の記事です。 書き方として割と見かける事が多いので、こういう使い方もできるよという知識の一つとしてご紹介します。 環境 $ ruby -v ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin19] 今回取り上げるメソッド Object#then (Ruby 3.0.0 リファレンスマニュアル) リファレンスとしては then で紹介されているが yield_self のエイリアスとなっている。 どういうときに使えるか 例えば 「対象の変数」の数値に2を加…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinkufencer.hateblo.jp%2Fentry%2F2021%2F12%2F13%2F000000&quot; title=&quot;Rubyにてyield_self/thenを使って普通の戻り値をメソッドチェインのように使う - コード日進月歩&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>2021-12-13 00:00:00</published>
  <title>Rubyにてyield_self/thenを使って普通の戻り値をメソッドチェインのように使う</title>
  <type>rich</type>
  <url>https://shinkufencer.hateblo.jp/entry/2021/12/13/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
