{"width":"100%","author_name":"rhysd","provider_url":"https://hatena.blog","height":"190","author_url":"https://blog.hatena.ne.jp/rhysd/","type":"rich","blog_url":"https://rhysd.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frhysd.hatenablog.com%2Fentry%2F20120505%2F1336171358\" title=\"Proc \u306b2\u9805\u6f14\u7b97\u5b50\u3092\u5b9a\u7fa9\u3057\u3066\u307f\u305f - \u306f\u3084\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u306a\u308a\u305f\u3044\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"url":"https://rhysd.hatenablog.com/entry/20120505/1336171358","description":"class Proc %w[ + - * / ** % | & ^ > < >= <= == <=> >> << =~ != !~ ].map{|i| i.to_sym }.each do |op| define_method(op) do |rhs| apply_binary(rhs,&op) end end private def apply_binary rhs raise \"block is needed\" unless block_given? Proc.new{|*args| yield self.call(*args),rhs.call(*args) } end end \u3053\u308c\u306b\u3088\u2026","published":"2012-05-05 07:42:38","title":"Proc \u306b2\u9805\u6f14\u7b97\u5b50\u3092\u5b9a\u7fa9\u3057\u3066\u307f\u305f","provider_name":"Hatena Blog","version":"1.0","categories":["Ruby"],"blog_title":"\u306f\u3084\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u306a\u308a\u305f\u3044"}