<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>lranran123</author_name>
  <author_url>https://blog.hatena.ne.jp/lranran123/</author_url>
  <blog_title>趣味プログラマがまれになんかしたことの記録</blog_title>
  <blog_url>https://lranran123.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>小技</anon>
  </categories>
  <description>最近Code Golfに目覚めて、その簡潔なコーディングに日々感銘を受けています。Rubyでは、たとえば、Aという変数がすでに定義済みであればなにもせず、定義されていなければ&quot;B&quot;という値をいれる、というのを自己代入演算子を用いて短く表現できます。 A||=&quot;B&quot; 今仕事でテキストデータを処理していて、ハッシュ値が存在していない時は、ハッシュ値を作成し、存在しているときは既存のハッシュ値+&quot;X&quot;で更新する、ということが必要になりました。 h = Hash.new h[:key] = !(h[:key]) ? &quot;some value&quot; : h[:key] + &quot;X&quot; 三項演算子嫌い。なにか短く書…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flranran123.hatenadiary.org%2Fentry%2F20140529%2F1401326183&quot; title=&quot;もっと短くかけないものかな：ハッシュが存在していない時はハッシュ値を入れ、存在しているときはハッシュ値＋&amp;quot;X&amp;quot;で更新する、 - 趣味プログラマがまれになんかしたことの記録&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>2014-05-29 10:16:23</published>
  <title>もっと短くかけないものかな：ハッシュが存在していない時はハッシュ値を入れ、存在しているときはハッシュ値＋&quot;X&quot;で更新する、</title>
  <type>rich</type>
  <url>https://lranran123.hatenadiary.org/entry/20140529/1401326183</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
