Ruby Pocket Reference
Book Details
Written by Michael Fitzgerald.
Buy this on Amazon
($9.99)
Editorial Review (from Amazon.com)
Although Ruby is an easy language to learn, in the heat of action you may find that you can't remember the correct syntax for a conditional or the name of a method. This handy pocket reference offers brief yet clear explanations of Ruby's core components, from operators to reserved words to data structures to method syntax, highlighting those key features that you'll likely use every day when coding Ruby.Whether you've come to Ruby because of the Rails web development framework --Ruby's killer app -- or simply because it's a relatively clean, powerful and expressive language that's useful for a lot of applications, the Ruby Pocket Reference is organized to help you find what you need quickly. This book not only will get you up to speed on how Ruby works, it provides you with a handy reference you can use anywhere, anytime.
In this book, you find essential information on:
- Reserved words, operators, comments, numbers, variables, ranges, and symbols
- Predefined variables andglobal constants
- Conditional statements, method use, classes, and modules (mixins)
- Lists of methods from the Object, String, Array, and Hash classes and the Kernel module
- sprintf andtime formatting directories
- Interactive Ruby (irb) and the Ruby debugger
- Ruby documentation
User Reviews (1) Login or create an account to write a review.
Dale Brayden thinks this book is Nothing Special.
I'm always tempted by pocket references, and nearly always disappointed. The Ruby Pocket Reference is no exception.
It is not clear who the target audience is. Beginning ruby programmers would not find enough tutorial information here to get started. Experienced ruby programmers will not find anything here that isn't more easily (and in some cases, more accurately) found in ri or rdoc documentation.
To make matters worse, I found a number of errors. For instance, in sec. 1.16.1.1 the examples given of the 'not' operator (!) are incorrect - the examples repeatedly are of the form !x == y where what was intended was !(x == y). Sec. 1.16.5 claims that the ruby case statement uses the semantics of == to evaluate the 'when' expressions, then goes on to show examples that illustrate that it is actually the === operator that is used.
Other parts of the book are simply not helpful. For example, sec. 1.16.6 talks about the "for var in container" construct, but the examples only show this being applied to Ranges, and the text never mentions that the construct will work on any implementer of Enumerable.
In all, I cannot recommend this book to anyone. If you need a portable ruby reference, then get the PDF of the Pickaxe book and carry it on your stick. If you need a good beginner's tutorial, there are plenty of them online (check out Why the Lucky Stiff, for example).
