{"categories":["ruby"],"url":"https://d.aereal.org/entry/20091026/1256547144","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fd.aereal.org%2Fentry%2F20091026%2F1256547144\" title=\" \u30cd\u30b9\u30c8\u3055\u308c\u305f\u5b9a\u6570\u3092\u53d6\u5f97\u3059\u308b - \u300e\u8a00\u8449\u3092\u5410\u304f\u300f\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://d.aereal.org/","width":"100%","blog_title":"\u300e\u8a00\u8449\u3092\u5410\u304f\u300f","image_url":null,"published":"2009-10-26 17:52:24","description":"def get_each_const(const, context=::Object) const.to_s.split(/::/).inject(context) {|parent, c| parent.const_get(c) } end module Foo module Bar module Hoge module Fuga end end end end bar = get_each_const \"Foo::Bar\" # -> Foo::Bar fuga = get_each_const \"Hoge::Fuga\", bar # -> Foo::Bar::Hoge::Fuga \u3088\u304f\u3042\u308b\u2026","height":"190","author_url":"https://blog.hatena.ne.jp/aereal/","version":"1.0","type":"rich","provider_name":"Hatena Blog","author_name":"aereal","provider_url":"https://hatena.blog","title":" \u30cd\u30b9\u30c8\u3055\u308c\u305f\u5b9a\u6570\u3092\u53d6\u5f97\u3059\u308b"}