<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tbpg</author_name>
  <author_url>https://blog.hatena.ne.jp/tbpg/</author_url>
  <blog_title>Tbpgr Blog</blog_title>
  <blog_url>https://tbpgr.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>概要 nilガード 内容 nilガードとは以下の様な記法です。 hoge ||= [] これは実際に意味するところは以下のコードです。 if hoge != nil hoge = hoge else hoge = [] end サンプル # encoding: UTF-8 require &quot;pp&quot; def nil_gard(value) return value ||= [] end def not_nil_gard(value) value if value != nil [] end [[1,2,3],nil].each do |item| pp item print &quot;nil_gard=…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftbpgr.hatenablog.com%2Fentry%2F20130702%2F1372775693&quot; title=&quot; メタプログラミングRuby | イディオム | nilガード - Tbpgr Blog&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>2013-07-02 23:34:53</published>
  <title> メタプログラミングRuby | イディオム | nilガード</title>
  <type>rich</type>
  <url>https://tbpgr.hatenablog.com/entry/20130702/1372775693</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
