<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thinkAmi</author_name>
  <author_url>https://blog.hatena.ne.jp/thinkAmi/</author_url>
  <blog_title>メモ的な思考的な</blog_title>
  <blog_url>https://thinkami.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Rails</anon>
  </categories>
  <description>Railsを使ったソースコードを眺めていたところ、モデルのメソッドにて def foo !!bar&amp;.baz end というコードがありました。 どのような挙動になるのか気になったので、試してみた時のメモを残します。 目次 環境 モデル構造 挙動確認 否定(!)や二重否定(!!)の確認 ぼっち演算子(&amp;.)と組み合わせた、!や!!の確認 多対一での確認(market : area = n : 1) 一側(area)が無い場合 一側(area)がある場合 一対多での確認(area : apple = 1 : n) 多側(apple)が無い場合 多側(apple)がある場合 元々のメソッドの動作確…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthinkami.hatenablog.com%2Fentry%2F2023%2F02%2F24%2F230107&quot; title=&quot;Railsで、二重否定(!!) + ぼっち演算子(&amp;amp;.) が使われているソースコードの挙動を確認してみた - メモ的な思考的な&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>https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-02-24 23:01:07</published>
  <title>Railsで、二重否定(!!) + ぼっち演算子(&amp;.) が使われているソースコードの挙動を確認してみた</title>
  <type>rich</type>
  <url>https://thinkami.hatenablog.com/entry/2023/02/24/230107</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
