ruby self.included用法
摘要:===Module#included 当一个模块混入到类时,如果该模块的included方法已经定义,那么该方法被调用。该方法的唯一参数就是接受混含的类的名字。 1 module M 2 def self.included(c) 3 puts "I have justbeen mixed into
阅读全文
posted @ 2016-02-02 22:25
posted @ 2016-02-02 22:25
posted @ 2016-02-02 22:19