<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>oooooooo</author_name>
  <author_url>https://blog.hatena.ne.jp/oooooooo/</author_url>
  <blog_title>Ruby and Rails</blog_title>
  <blog_url>https://rubyandrails.hatenablog.com/</blog_url>
  <categories>
    <anon>rails</anon>
    <anon>ruby</anon>
  </categories>
  <description>a ||= b と a || b a が nil なら初期値を入れたい場合。 a = nil a = 100 if a.nil? # =&gt; 100 は a = nil a ||= 100 #=&gt; 100 と書けます。通称 nil ガード。 nil ガードの逆。すでに値が入っている場合に書き換えたいなら。 a = 100 a = 200 if a.present? #=&gt; 200 は a = 100 a || 200 #=&gt; 200 と書けます。a が nil なら nil のまま。 Rails.root Rails.root.join('tmp', 'foo', 'bar') は Rails.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyandrails.hatenablog.com%2Fentry%2Fsnippets&quot; title=&quot;Ruby と Rails の便利な書き方 - Ruby and Rails&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>2015-05-15 15:34:46</published>
  <title>Ruby と Rails の便利な書き方</title>
  <type>rich</type>
  <url>https://rubyandrails.hatenablog.com/entry/snippets</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
