作者:
Dave Thomas
/
Chad Fowler
/
Andy Hunt 出版社: Pragmatic Bookshelf 副标题: The Pragmatic Programmers' Guide, Second Edition 出版年: 2004-10-8 页数: 829 定价: USD 44.95 装帧: Paperback ISBN: 9780974514055
Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer's Guide.
Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer's Guide.
Now in its Second Edition, author Dave Thomas has expanded the famous Pickaxe book with over 200 pages of new content, covering all the new and improved language features of Ruby 1.8 and standard library modules. The Pickaxe contains four major sections: An acclaimed tutorial on using Ruby. The definitive reference to the language. Complete documentation on all built-in classes, modules, and methods Complete descriptions of all 98 standard libraries.
If you enjoyed the First Edition, you'll appreciate the new and expanded content, including: enhanced coverage of installation, packaging, documenting Ruby source code, threading and synchronization, and enhancing Ruby's capabilities using C-language extensions. Programming for the world-wide web is easy in Ruby, with new chapters on XML/RPC, SOAP, distributed Ruby, templating systems and other web services. There's even a new chapter on unit testing.
This is the definitive reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including more than 250 significant changes since the First Edition). Coverage of other features has grown tremendously, including details on how to harness the sophisticated capabilities of irb, so you can dynamically examine and experiment with your running code. "Ruby is a wonderfully powerful and useful language, and whenever I'm working with it this book is at my side" --Martin Fowler, Chief Scientist, ThoughtWorks
When you design a class, you decide what internal state it has and also decide how that state is to appear on the outside (to users of your class). The internal state is held in instance variables. The external state is exposed through methods we’re calling attributes. And the other actions your class can perform are just regular methods. It really isn’t a crucially important distinction, but by calling the external state of an object its attributes, you’re helping clue people in to how they should view the class you’ve written. (查看原文)
Ruby gives you three levels of protection:
• Public methods can be called by anyone—no access control is enforced. Methods are public by default (except for initialize, which is always private).
• Protected methods can be invoked only by objects of the defining class and its sub- classes. Access is kept within the family.
• Private methods cannot be called with an explicit receiver—the receiver is always the current object, also known as self. This means that private methods can be called only in the context of the current object; you can’t invoke another object’s private methods.
The difference between “protected” and “private” is fairly subtle and is different in Ruby than in most common OO languages. If a method is protected, it may be called by any instance of the defining class or it... (查看原文)
0 有用 g9 2007-08-10 11:41:00
很好的入门书和参考书。也适当介绍了些元编程的内容,让我们知道在哪些地方深化。当然,光读这本书也是远远不够滴。
0 有用 死亡的飞翔 2013-12-25 22:10:55
不错的一本书,结合了tutorial和reference的特点,前三部分用于学习语言特性,第四部分用于API查阅
0 有用 灭灭 2013-01-07 15:16:08
ruby
0 有用 Buddha 2008-11-15 20:55:43
废话有点多,原版书的通病 推荐的原则是实用及原创性 ruby还是很好的
0 有用 我就改个名字 2013-06-23 10:24:37
说的过去的一本书,考虑要不要重读。
0 有用 就就就就这样吧 2023-02-11 00:09:46 重庆
@2009-01-01 17:03:09
1 有用 第四只猴子 2016-07-04 16:22:45
ruby真是挺好玩的,又好看。
0 有用 慢半拍 2016-03-25 11:07:51
讲解顺序太奇葩...并不适应...但还是很全面的,毕竟bookshelf.
0 有用 隔壁家的阿绵 2015-03-11 17:39:18
思路不够清晰,并不是特别适合有点基础的初学者。
0 有用 Hanks 2015-01-12 16:45:30
学习ruby基础操作,通过此书可以很快对ruby on rails,上手开发简单的web应用。