<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rhysd</author_name>
  <author_url>https://blog.hatena.ne.jp/rhysd/</author_url>
  <blog_title>はやくプログラムになりたい</blog_title>
  <blog_url>https://rhysd.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>class Proc %w[ + - * / ** % | &amp; ^ &gt; &lt; &gt;= &lt;= == &lt;=&gt; &gt;&gt; &lt;&lt; =~ != !~ ].map{|i| i.to_sym }.each do |op| define_method(op) do |rhs| apply_binary(rhs,&amp;op) end end private def apply_binary rhs raise &quot;block is needed&quot; unless block_given? Proc.new{|*args| yield self.call(*args),rhs.call(*args) } end end これによ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frhysd.hatenablog.com%2Fentry%2F20120505%2F1336171358&quot; title=&quot;Proc に2項演算子を定義してみた - はやくプログラムになりたい&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>2012-05-05 07:42:38</published>
  <title>Proc に2項演算子を定義してみた</title>
  <type>rich</type>
  <url>https://rhysd.hatenablog.com/entry/20120505/1336171358</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
