首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
Ruby
你真的理解instance_eval, class_eval和define_method吗?
daqing
·
2011 年 4 月 22 日
· 6711 次点击
这是一个创建于 5410 天前的主题,其中的信息可能已经有所发展或是发生改变。
https://gist.github.com/936136
请问a, b, c, d四个方法,分别是实例方法,还是类方法呢?
eval
方法
method
2 条回复
•
1970-01-01 08:00:00 +08:00
1
iwinux
2011 年 4 月 29 日
a 是 Class 的类方法
b 是 Test 的类方法
c 是 Test 的实例方法
d 是 Test 的类方法
https://gist.github.com/947384
2
lychee
2011 年 4 月 29 日
- - 来学习下 前两天正好在纠结这几个函数
关于
·
帮助文档
·
自助推广系统
·
博客
·
API
·
FAQ
·
Solana
·
1048 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 25ms ·
UTC 17:52
·
PVG 01:52
·
LAX 09:52
·
JFK 12:52
♥ Do have faith in what you're doing.
❯