{"url":"https://y0m0r.hateblo.jp/entry/20120116/1326715412","version":"1.0","author_name":"yuheiomori0718","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20120116%2F1326715412\" title=\"Ruby\u3001Python\u3067\u52d5\u7684\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1/\u52d5\u7684\u30e1\u30bd\u30c3\u30c9\u5b9a\u7fa9 - \u30e1\u30e2\u7f6e\u304d\u5834\" 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,"title":"Ruby\u3001Python\u3067\u52d5\u7684\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1/\u52d5\u7684\u30e1\u30bd\u30c3\u30c9\u5b9a\u7fa9","blog_title":"\u30e1\u30e2\u7f6e\u304d\u5834","provider_url":"https://hatena.blog","categories":["python","ruby","metaprogramming"],"author_url":"https://blog.hatena.ne.jp/yuheiomori0718/","published":"2012-01-16 21:03:32","provider_name":"Hatena Blog","width":"100%","type":"rich","description":"\u52d5\u7684\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1 \u52d5\u7684\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1\u306f\u3001\u300c\u5b9f\u884c\u6642\u306b\u547c\u3073\u51fa\u3059\u30e1\u30bd\u30c3\u30c9\u3092\u6c7a\u3081\u308b\u300d\u3053\u3068\u3092\u6307\u3057\u307e\u3059\u3002 ruby\u3067\u306fsend\u306b\u3088\u3063\u3066\u52d5\u7684\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1\u304c\u3067\u304d\u307e\u3059 method_to_call = :upcase obj = \"abc\" obj.send(method_to_call) # => \"ABC\" python\u3067\u306f\u30e1\u30bd\u30c3\u30c9\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306a\u306e\u3067\u3001getattr\u3092\u4f7f\u3063\u3066\u3001\u30e1\u30bd\u30c3\u30c9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3066\u3001\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059 method_to_call = 'upper' obj = \"abc\" getattr(obj, method_to_call)() # => \"ABC\" \u52d5\u7684\u30e1\u30bd\u30c3\u30c9\u5b9a\u7fa9 \u52d5\u7684\u2026","blog_url":"https://y0m0r.hateblo.jp/","height":"190"}