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. This thoroughly revised and updated second edition of the bestselling Metaprogramming Ruby 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.
Metaprogramming Ruby, Second 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.
What You Need:
Ruby 2.x, Ruby 1.9, or a recent version of JRuby.
Remixology: Tracing the Dub Diaspora (Reverb)
Dub is the avant-garde verso of reggae, created by manipulating and reshaping recordings using studio strategies and techniques. While dub was one of the first forms of popular music to turn the idea of song inside out, it is far from being fully explored. Tracing the evolution of dub, Remixology travels from Kingston, Jamaica, across...
Transition to Renewable Energy Systems
In the wake of global climate change and increasing geopolitical instability of oil supply an accelerated transition to renewable energy system gets increasingly important, if not unavoidable.
This book encompasses reports of select energy strategies as well as in-depth technical information of the already or potentially involved...
GlassFish Administration To build a powerful production environment for your Java EE systems, you need a great application server, and the skills to manage it. This book gives you all that you are looking for.
This book will help you gain the necessary skills to install, configure, tune, and troubleshoot GlassFish so that you can fully unleash its power. It will...
Historical Information Science: An Emerging Unidiscipline It suggests that trends in information retrieval, research, and teaching using modern information technology point toward a unidisciplinary field, Historical Information Science, which potentially can grow out of older quantification and Social Science history, the interplay between History and Information Science, and new methodologies and... FileMaker Pro 6 for the Mac Fast & Easy FileMaker Pro 6 for the Mac Fast & Easy presents the essential skills that beginning and intermediate users need to know to use the FileMaker Pro 6.0 database application effectively. It covers basic database skills, such as planning, defining fields, and creating forms and explores new features, such as using a contextual menu to sort data... Top 10 Washington DC (EYEWITNESS TOP 10 TRAVEL GUIDE)
DK Eyewitness Top 10 Guides make any destination accessible by offering dozens of lists of the 10 best restaurants, bars, neighborhoods, hotels, local attractions, and much more. With insider tips for every visitor, the Top 10 series offers inside knowledge, and now contains a pull-out map and guide that includes fold-out maps of city...