{"type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftbpgr.hatenablog.com%2Fentry%2F20140627%2F1403874538\" title=\"Ruby | Method | to_proc - Tbpgr Blog\" 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,"height":"190","provider_name":"Hatena Blog","published":"2014-06-27 22:08:58","categories":["Ruby"],"title":"Ruby | Method | to_proc","version":"1.0","blog_url":"https://tbpgr.hatenablog.com/","blog_title":"Tbpgr Blog","description":"\u6982\u8981 Method#to_proc -> Proc \u8a73\u7d30 self \u3092 call \u3059\u308b Proc \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u3066\u8fd4\u5374\u3002 \u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9 1.rb require 'tbpgr_utils' class Hoge def hoge1 \"hoge\" end def hoge2(param1, param2) [param1, param2]*2 end end h = Hoge.new m1 = h.method(:hoge1) m2 = h.method(:hoge2) bulk_puts_eval binding, <<-EOS m1.to_proc m2.to_proc m1.to_\u2026","author_url":"https://blog.hatena.ne.jp/tbpg/","author_name":"tbpg","width":"100%","provider_url":"https://hatena.blog","url":"https://tbpgr.hatenablog.com/entry/20140627/1403874538"}