ä»åã®æ¦è¦ ååã¯ãããã¯ä»ãã¡ã½ããã«ã¤ãã¦èª¬æãããä»åã¯ååã«å¼ãç¶ãã¦Rubyã®ç¹å¾´çãªææ³ããç´¹ä»ããããmix-inã ããã®mix-inã¯Rubyã®ã¯ã©ã¹ã©ã¤ãã©ãªãRailsã«ããã使ããã¦ããä»çµã¿ã§ããããã®mix-inã¯ã¢ã¸ã¥ã¼ã«ã使ã£ã¦æä¾ããã¦ããã mix-inã使ãåã®æºå ãã£ããmix-inã使ãåã«ãã¢ã¸ã¥ã¼ã«ã«ã¤ãã¦èª¬æããããmix-inã¯ãã®ã¢ã¸ã¥ã¼ã«ã使ã£ã¦å®ç¾ãã¦ããã ã¢ã¸ã¥ã¼ã«ã¯ä»¥ä¸ã®ããã«moduleå¥ã§å®ç¾©ãããã¢ã¸ã¥ã¼ã«åã®å é ã¯å¤§æåã§å§ããã module ModuleSample #ã¢ã¸ã¥ã¼ã«ã®å®ç¾© def self.hoge puts "hoge-" end end ModuleSample.hoge #ã¢ã¸ã¥ã¼ã«ã«å«ããã¡ã½ããã®å¼ã³åºã ã¢ã¸ã¥ã¼ã«ã®å¶é ä¸è¨ã®ãµã³ãã«ã§ã¯ã¢ã¸ã¥ã¼ã«ã®ä¸ã«ã¡ã½ãããå®ç¾©ããããã¢ã¸ã¥ã¼ã«å.
{{#tags}}- {{label}}
{{/tags}}