åå ã¯ã³ã³ããã¹ãã®æ¦å¿µãçºãã¦ãklassãç解ãããã¨ãå¿ è¦ã ã¨ãã話ã«ãªã£ãã®ã§ãã£ãã klass classæã®ä¸ã§ã¯æ§ç¯ãããã¨ãã¦ããã¯ã©ã¹ã«å¯¾å¿ããClassãªãã¸ã§ã¯ããselfã¨ãªã£ã¦ãããããã«ãclassæã®ä¸ã§ã®ã¯ã©ã¹ã¡ã½ããå®ç¾©ãã¿ãã¨ããªãã¨ãªãããããã©ã«ãã§ã¯selfã«ãæå®ããã°ãã®ãªãã¸ã§ã¯ãã«ãã¨ããã¡ã½ããå¼ã³åºãã«ãããã¬ã·ã¼ãã¼è§£æ±ºã«ä¼¼ã¦ããã class Foo def self.class_method_hoge p :hoge end end class Bar def Foo.class_method_huga p :huga end def self.class_method_huga_of_bar p :huga end end ãã®ãã¨ãèããã¨Rubyã§ã¯ãã¡ã½ããã¯selfã«å®ç¾©ãããã¨èããããªãããããã§ã¯ãªããå®ã¯ãã
{{#tags}}- {{label}}
{{/tags}}