阅读背景:

如何列出ruby中给定对象的所有可用方法,而不是内置的方法

来源:互联网 

How do i list all the methods of an object in Ruby which are not in-built methods, if I do Fruit.new.methods it will list all the methods which includes user defined methods which are declared in the class Fruit,I want to see only the methods which are written in class Fruit.How do i list all the methods of an object in R




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

分享到: