阅读背景:

为什么在ruby中创建元类?

来源:互联网 

I m trying to understand the Ruby Object Model. I understood that the instance methods are saved in the class rather than in the objects of the class because it removes redundancy. I read that whenever a class is created, a metaclass is created too for the newly created class. the metaclass stores the class methods. ie the singleton methods of the class are located in the metaclass. egI m trying to understand the Ruby Object Model.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: