<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>まことに FizzBuzz の種は盡きまじ。 fizzbuzz = Enumerator.new {|y| (1..).each do |i| f = (i % 3).zero? b = (i % 5).zero? y &lt;&lt; case when f &amp;&amp; b then &quot;FizzBuzz&quot; when f then &quot;Fizz&quot; when b then &quot;Buzz&quot; else i.to_s end end } puts fizzbuzz.take(40) Enumerator と Endless Range は使いたいよね。場合分けは case ~ when。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2021%2F11%2F03%2F131057&quot; title=&quot;Ruby 的に自然な FizzBuzz - Camera Obscura&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-11-03 13:10:57</published>
  <title>Ruby 的に自然な FizzBuzz</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2021/11/03/131057</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
