Book Of Ruby Free eBook - Chapter 7: methods, singletons and more...
A new chapter has just been added to The Book Of Ruby, our free eBook guide to Ruby programming.
At first sight, this new chapter may sound pretty elementary - it’s all about methods. Don’t be fooled, however - Ruby’s methods are not as straightforward as they seem. In fact, I’d say that this is probably the most difficult chapter so far. There are certain topics - such as, for example, singleton methods and classes, the behaviour of class methods and constructors, the scoping of nested methods and the use and effect of Ruby’s access modifiers - which may take quite a bit of time and thought to understand.
Remember that every chapter comes complete with all the example programs ready to run. I would strongly recommend that you try out those programs when you have difficulty understanding a topic. This new chapter alone comes with nineteen sample programs. The Book Of Ruby, so far, has 112 demo programs and 139 pages. And we are only on Chapter 7 (of 20).
It’s worth bearing in mind, by the way, that the PDF file is bookmarked. The easiest way to find your way around is by opening the Table Of Contents in Acrobat Reader (View/Navigation Panels/Bookmarks) and click on the chapter heading or top heading to zoom straight to it.