<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takeru-c</author_name>
  <author_url>https://blog.hatena.ne.jp/takeru-c/</author_url>
  <blog_title>パンプキンスパイスラテ</blog_title>
  <blog_url>https://pumpkin.hatenablog.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>メモ</anon>
  </categories>
  <description>自分メモ。 ■hash['hogehoge']['fugafuga']の存在確認をする。 defined?を使う。 if defined? hash['hogehoge']['fugafuga'] then puts &quot;あり&quot; else puts &quot;なし&quot; end 三項演算子を使って書くならこう。 puts defined?(hash['hogehoge']['fugafuga']) ? &quot;あり&quot; : &quot;なし&quot; defined?()のように三項演算子では()が必要。 勘違いしていました。 コメントより defined?は「式が定義されていなければ偽」なので、エラーなく式が実行できる状態であれば…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpumpkin.hatenablog.jp%2Fentry%2F20090519%2F1242752019&quot; title=&quot;Rubyで二次元ハッシュの存在確認 - パンプキンスパイスラテ&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>2009-05-19 01:53:39</published>
  <title>Rubyで二次元ハッシュの存在確認</title>
  <type>rich</type>
  <url>https://pumpkin.hatenablog.jp/entry/20090519/1242752019</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
