【发布时间】:2012-11-20 19:44:18
【问题描述】:
Pry 提供的功能,使用 'cd' 更改内容并使用 'ls' 显示其中的所有方法和变量。
我的问题是如何在 Module 中使用它,比如在 Math 模块中显示所有方法
【问题讨论】:
-
这一直对我有用:
cd MathlsMath.methods: acos acosh asin asinh atan atan2...这对你不起作用吗?
Pry 提供的功能,使用 'cd' 更改内容并使用 'ls' 显示其中的所有方法和变量。
我的问题是如何在 Module 中使用它,比如在 Math 模块中显示所有方法
【问题讨论】:
cd Math ls Math.methods: acos acosh asin asinh atan atan2 ...这对你不起作用吗?
[4] pry(main)> ls Math -m
Math.methods: acos acosh asin asinh atan atan2 atanh cbrt cos cosh erf erfc exp frexp gamma hypot ldexp lgamma log log10 log2 sin sinh sqrt tan tanh
[5] pry(main)>
【讨论】: