Write powerful Ruby code that is easy to maintain and change. With metaprogramming, you can produce elegant, clean, and beautiful programs. Once the domain of expert Rubyists, metaprogramming is now accessible to programmers of all levels. Now thoroughly revised and updated, Metaprogramming Ruby 2: Program Like the Ruby Pros (Pragmatic Bookshelf, $38 paper, $25 ebook), explains metaprogramming in a down-to-earth style and arms you with a practical toolbox that will help you write your best Ruby code ever.
Dig under the surface and explore Ruby’s most advanced feature: a collection of techniques and tricks known as metaprogramming. In this book, you’ll learn metaprogramming as an essential component of Ruby and discover the deep, non-obvious details of the language. Once you understand the tenets of Ruby, including the object model, scopes, and singleton classes, you’re on your way to applying metaprogramming both in your daily work assignments and in your fun, after-hours projects.
This new edition makes mastering the language enjoyable. The book is packed with:
- Pragmatic examples of metaprogramming in action, many of which come straight from real-life gems such as Rails.
- Programming challenges that let you experiment and play with some of the most out-there metaprogramming concepts.
- Metaprogramming “spells”—33 practical recipes and idioms that you can study and apply right now, to write code that is sure to impress.
This completely revised new edition covers the new features in Ruby 2.0 and 2.1, and contains code from the latest Ruby libraries, including Rails 4. Most examples are new, “from the wild,” with more recent libraries. And the book reflects current ideas of when and how much metaprogramming you should use.
Whether you’re a Ruby apprentice on the path to mastering the language or a Ruby wiz in search of new tips, this book is for you.
Available for e-readers in epub, mobi, and PDF formats direct from the publisher and in paperback from fine bookstores worldwide.
Metaprogramming Ruby 2
Program Like the Ruby Pros
ISBN: 9781941222126, 278 pages, $38.00US, $40.00CA, 7.5×9.25.
Pragmatic Bookshelf Titles are distributed to bookstores internationally by O’Reilly Media.
Sample chapters, table of contents, and more information is available on the book’s home page.
About Pragmatic Bookshelf
The Pragmatic Bookshelf features books written by developers for developers. The titles continue the well-known Pragmatic Programmer style, and continue to garner awards and rave reviews. As development gets more and more difficult, the Pragmatic Programmers will be there with more titles and products to help programmers stay on top of their game.
Press and Editorial Queries Only:
Contact Andy Hunt or Dave Thomas
800-699-7764 (+1 919-847-3884)