Perfect for programmers at all levels, Ruby by Example explores Ruby's functional power-inspired by Lisp-through the use of numerous practical and illustrative examples. The book includes short scripts, ranging from the simple to the complex, that do something interesting while also illustrating key concepts in Ruby. These scripts manipulate text, manipulate numbers (in ways that extend Ruby's numeric classes), and much more, all while showing readers how to use the language to extend itself. The author offers full explanations of how the provided examples work, as well as ideas for expanding and improving them. Readers learn about Ruby's abilities by experimenting with IRB (the interactive Ruby shell); RubyGems; and relatively high-level topics such as open classes, mixins, inheritance, and functional programming (both straightforward recursion and built-in methods like map, inject, and so on). An introduction to building Web applications with Ruby on Rails is included as well as how to get Ruby working within a Web server.