Ruby语言文摘:理解关键词self
Posted by cnruby Sat, 05 Aug 2006 10:27:00 GMT
Ruby语言文摘:理解关键词self
- 文摘:
In Ruby, 'self' is a keyword; in a method body, 'self' always refers to the object that the method was called from. No need to define 'self' in the argument list. - 代码例子:
http://cnruby.googlecode.com/svn/trunk/ruby-projects/ruby-self
________________________________________________________________ 您只要点击下面图标,就可以把本文加入到您喜欢的公共收藏库中去。



![Validate my RSS feed [Valid RSS]](/blog1/files/valid-rss.png)




