Metaprogramming Masterclass

“Everyone says metaprogramming is too advanced...”

Master metaprogramming, master Ruby.

Learning to program is a daunting task in and of itself. Once you get started and have the basics of Ruby covered you end up bumping into strange looking code.

Metaprogramming in Ruby is often called magic.

Libraries like ActiveRecord create an incredible amount of features in your code merely by using code like has_many. Ruby has features which allow you to create this level of productivity for creating the parts you need. But it's not magic.

They say it causes too many problems and can be a pain for debugging.

It sure can. Cobbling together a solution from reading a few blog posts can lead so some unnecessarily complicated code if you don't have a proper understanding of what's going on. Coding without knowing the costs can put you in a bad position. When it comes to debugging hastily creating code, you'll regret your decision to use metaprogramming in the first place.

If you haven't done much metaprogramming yourself apart from following a tutorial or two, every now and then you'll run into a gem that makes you tear your hair out trying to debug it.

They tell you it's too early for you to learn.

But what they don't know is that they learned in reverse order. Learning Ruby goes well with simple keywords like "class" and "def" but there's a whole lot more behind how it all works.

Metaprogramming allows you to do more.

Often it's described as code that writes code but that description doesn't reveal the real reason behind the use of metaprogramming. Ruby allows you to know about what's happening inside your system and hook into objects, their methods, and how they are pieced together. Metaprogramming gives you control over this process and allows you to solve a problem once and to reuse and repackage your solution to make solving it again easy.

Ruby Metaprogramming Masterclass teaches you to do more with Ruby, from the author of Clean Ruby, and Ruby DSL Handbook.

Ruby Metaprogramming Masterclass will give you the knowledge and a solid, foundational understanding of what you can do with Ruby.

Learn to fill in nagging gaps in your knowledge of how everything works together. Understand the difference between class_eval and instance_eval, see how understanding singleton_class affects your understanding, and much more. Having a proper understanding of metaprogramming can give you the power of untangling what's going on from a printed stack trace and help you find the best fix.

Sometimes, understanding metaprogramming is the key to working with difficulties in a system. Metaprogramming can help you bridge the gap between a working program and a better program. Sometimes cracking into metaprogramming techniques is the only way to add features and can help you redesign to something way better.

Metaprogramming isn't something that only Ruby masters know how to do. You can do it to and you'll learn more about Ruby than you expected. You'll become the master.

Master metaprogramming, master Ruby.

Why you should take this class

You should have experience with Ruby but you don't need much. This class will answer questions about how you can add behavior to libraries you use in your system. You'll understand the features present in Ruby which allow you to manipulate your project to give you more power over how it works. And you'll reveal the underlying nature of how Ruby works.

You'll get a solid handle on multiple ways to work with class_eval, instance_eval, yieldand calling blocks, method_missing, respond_to_missing?, constant lookups, dynamic class and module creation, and how all this fits together.

About Your Teacher

Jim Gay is the author of Clean Ruby, the Ruby DSL Handbook, the Lead Developer for Radiant CMS and is a prolific contributor to it and many open-source projects. At Saturn Flyer LLC he’s built numerous Radiant sites, custom applications, and award winning graphic design and has had his designs published in HOW Magazine and The Best of LogoLounge. He’s been a co-host of the Ruby 5 podcast, speaker at RubyConf 2013, RubyConf 2014, Ruby Kaigi, Wroclove.rb, ArrrrCamp, and RubyNation, co-founder of Arlington Ruby and has been professionally building Ruby and Rails applications since 2006.


What people have said about the teacher:

"I learned a tremendous amount from Jim. With this help I was creating a simple DSL to support my QA automation tasks using metaprogramming in Ruby. I feel power and I am now leading the automated test effort at my firm!" —  Kim Le

Ruby Metaprogramming Masterclass by Jim Gay uncovers many great techniques and debugging tips. Highly recommended. Warren Vosper




Join the Ruby Metaprogramming Masterclass

4 Hours of diving deep into ruby

Most training classes are hundreds or thousands of dollars where spending $800 is a great deal. You'll get downloadable recordings, cheatsheets, exercises, reusable source code and a copy of Ruby DSL Handbook for only $279.

The class is sold out and another has not yet been scheduled. You can purchase the recording of the class for less than the course itself at only $279.

Get a FREE sample chapter

Get a sample chapter of Clean Ruby and you'll be added to my periodic newsletter of helpful Ruby tips.