<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zrbabbler</author_name>
  <author_url>https://blog.hatena.ne.jp/zrbabbler/</author_url>
  <blog_title>マクロツイーター</blog_title>
  <blog_url>https://zrbabbler.hatenablog.com/</blog_url>
  <categories>
    <anon>TeX以外</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>前回の話でちょっと出した、残念な「メソッド的 if」について。 1.upto(20) do |n| (n % 15 == 0).if { puts 'FizzBuzz' }.else(n % 3 == 0).if { puts 'Fizz' }.else(n % 5 == 0).if { puts 'Buzz' }.else { puts n } end (真偽値).if {...} の形に合わせて else-if をメソッドチェーンの形に入れようとすると、上のような気持ちの悪い形にせざるを得なかった。この形は他にも問題があって、 }.else (n % 3 == 0).if { と空白文字を…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzrbabbler.hatenablog.com%2Fentry%2F20120726%2F1343327658&quot; title=&quot;Ruby でもっとオレ的な if 関数を - マクロツイーター&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>2012-07-26 03:34:18</published>
  <title>Ruby でもっとオレ的な if 関数を</title>
  <type>rich</type>
  <url>https://zrbabbler.hatenablog.com/entry/20120726/1343327658</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
