小智 5
取决于上下文.即.你找到这行代码的地方.
class Profile
def foo
results.merge(profile: self)
end
end
p = Profile.new
p.foo
Run Code Online (Sandbox Code Playgroud)
在这种情况下,"self"将指向对象"p",该对象是使用"self"的上下文中的当前对象.
| 归档时间: |
|
| 查看次数: |
85 次 |
| 最近记录: |