{"provider_url":"https://hatena.blog","blog_url":"https://blog.nishimu.land/","title":"Module\u306einclude\u3068\u304bextend\u3068\u304b","url":"https://blog.nishimu.land/entry/20081128/1227884935","description":"Module\u306einclude\u3068extend\u307e\u308f\u308a\u306e\u81ea\u5206\u7528\u30b5\u30f3\u30d7\u30eb \u57fa\u672c module Foo def self.included(base) base.extend ClassMethods base.__send__ :include, InstanceMethods end module ClassMethods # \u30af\u30e9\u30b9\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9 end module InstanceMethods # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9 end end (Bar = Class.new).__send__ :include, Foo p Bar.ancestors #=> [Bar, Foo::Inst\u2026","blog_title":"\u3061\u306a\u307f\u306b","published":"2008-11-28 00:08:55","provider_name":"Hatena Blog","image_url":null,"width":"100%","type":"rich","height":"190","author_url":"https://blog.hatena.ne.jp/Sixeight/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.nishimu.land%2Fentry%2F20081128%2F1227884935\" title=\"Module\u306einclude\u3068\u304bextend\u3068\u304b - \u3061\u306a\u307f\u306b\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["ruby"],"author_name":"Sixeight","version":"1.0"}