{"title":"Ruby \u3067\u30e1\u30bd\u30c3\u30c9\u540d\u304b\u3089 Proc \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2015%2F08%2F03%2F222910\" title=\"Ruby \u3067\u30e1\u30bd\u30c3\u30c9\u540d\u304b\u3089 Proc \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b - Secret Garden(Instrumental)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","provider_url":"https://hatena.blog","description":"#method \u3092\u4f7f\u3046\u3068\u30ec\u30b7\u30fc\u30d0\u306e\u30e1\u30bd\u30c3\u30c9\u3092 Proc \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u751f\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 class X def class_name \"class X\" end end x = X.new # \u30e1\u30bd\u30c3\u30c9\u540d\u3092\u6e21\u3059\u3068\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059 Proc \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059 class_name = x.method :class_name class_name.call # => \"class X\" plus3 = 3.method :+ plus3.call 2 # => 5 # Kernel \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u5bfe\u3057\u3066\u3082\u5229\u7528\u3067\u304d\u308b puts_ = method :puts # \u305d\u306e\u307e\u307e\u2026","image_url":null,"width":"100%","blog_title":"Secret Garden(Instrumental)","provider_name":"Hatena Blog","published":"2015-08-03 22:29:10","author_url":"https://blog.hatena.ne.jp/osyo-manga/","url":"https://secret-garden.hatenablog.com/entry/2015/08/03/222910","type":"rich","author_name":"osyo-manga","blog_url":"https://secret-garden.hatenablog.com/","categories":["Ruby"]}