作者a1234957 (涼子は俺の嫁)
看板Ruby
標題[問題] 要怎麼得到module OR class的所有var和function
時間Sun Aug 10 21:19:31 2008
(ctrl + y 刪去不必要的行列)
環境:
e.g. Ruby 1.8.6
狀況:
e.g. 我想要得到MODLE OR CLASS的所有var和function
附錄:
最近在研究RM VX的RGSS,需要一些在RGSS裡找不到的class和module的相關資訊
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.164.147.36
1F:→ poga:some_class.methods 或是singleton_methods 08/10 21:32
2F:→ poga:變數的話就some_class.instance_variables 08/10 21:32
3F:→ a1234957:非常感謝,這類資訊從哪找的呢? 08/10 21:57
5F:→ a1234957:我太依賴JAVA DOC了 囧 08/10 21:58
6F:→ poga:上面那個是標準函式庫,RGSS不一定有吧 08/11 00:23
7F:→ poga:要找核心的東西應該用這個 08/11 00:24
9F:→ poga:不過核心的東西也不保證RGSS就有... 08/11 00:24
10F:→ a1234957:嗯 找到我要的了 感謝 08/11 00:35