Programming with Ruby is fun and you want to be better.

Getting better at writing Ruby programs would make your day more fun and make you feel powerful. You want to be able to write code that others understand well and you want them to feel joy using your code. And when the next project rolls around at work, you want to be the one that people seek to build it.

Building easy to understand software that other developers will love using can require a lot of knowledge and experience.

There's so much to know, it's easy to feel lost.

What do you need to build for your project? Where do you start and what can you learn from the code you already use?
A typical Rails project has gems with well honed features that can do amazing things. Authentication? Add a gem. Caching? Add a gem. Debugging? Add a gem. Testing? Add a gem.
Your project grows features that you might not even know are there.
But your project has features made from code that you might not understand.

When things go wrong, documentation seems to be lacking useful details.

Sifting through incomplete documentation is worse than no documentation at all. At least missing documentation doesn’t tell you the wrong thing. And abandoned and out of date wikis are like a punch in the gut when you need clarity.

Searching the web leads to years-old articles that could still have accurate information. But gems change, Ruby changes, while information in blogs stays the same.

You’ve read blogs and documentation but nothing gives you the whole picture.

What is the code doing? Why create a class on the fly? Or why generate modules without typing it all out in the code? 

An article tells you to set a configuration option but it’s not clear why. Or documentation tells you to subclass some constant but what does that do? And how can you get your ideas working?

Diving into the source code to see how it’s put together is often a last resort. Sometimes it’s helpful, but sometimes it appears to be a mess of instance_eval, define_method, and other hard to understand features.

You’ve tried metaprogramming, but you weren’t quite sure it was the best way to code.

Cobbling together a solution from reading a few blog posts can lead so some complicated code. If you don’t have a proper understanding of what’s going on, this can put you in a bad position. And you might regret your decision to use metaprogramming in the first place.

Other experienced developers tell you to avoid it altogether. They say it causes too many problems. You might think ‘who am I to argue?’, but…

Being able to dive into your dependencies and follow the flow would give you power and control.

Being able to alter the way things work in the way you want would make your work exciting.
Having the confidence to dive into any code and make sense of it would give you independence.
Having confidence and control could help you doing things faster, better.

If you could build your own tools to make Ruby work for you, you could go home happy.

Almost nothing is worse than spending the entire day trying to get something to work but failing. When you know how to read and understand metaprogramming, you’ll see through the syntax to the feature hidden inside.

You can create tools to make your project better. You can write code that makes it easier to communicate about how it works.

You want to wield Ruby like a world class chef.

You’ve seen examples and read articles about dynamically creating methods. There’s code like define_method and define_singleton_method but… why? 

You’ve found code from a developer who abused their knowledge of metaprogramming. Code that should be simple is confusing. Sometimes metaprogramming is the wrong tool for the job when simpler code will do.

You want to know when to code with it, and when to avoid it.

Metaprogramming in Ruby is often called “magic”.
Gems like ActiveRecord do things for you when you write code like has_many. But it’s not magic.

Some features feel magical in a bad way. Poor or unnecessary use of metaprogramming can hide what’s happening. But great features can often feel magical in a good way too. Metaprogramming can help you compress your ideas into simple statements. You want your features to feel like that.

You want to be able to write code that’s easier to understand.

Metaprogramming with expertise can give you code that feels just right

And you want to develop expertise so that you feel confident.
You can balance the need for succinct code to handle complicated requirements.

You can better evaluate gems and tools that you use in your code.
You can create the tools that you need to make writing your own code better.

Ruby Metaprogramming MasterClass teaches you to do more.

Metaprogramming isn’t something that only Ruby masters can know how to do. You can do it too, and you’ll learn more about Ruby than you expected.

You’ll become the master.

Learning Ruby usually starts simple keywords like “class” and “def”. But there’s a whole world of mastery that you gain by starting with metaprogramming.

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

Get a solid foundation of what you can build with Ruby.
Understand the difference between class_eval and instance_eval. See how knowing your singleton_class affects your understanding, and much more. 

Master metaprogramming, master Ruby.

  • Get a handle on ways to work with class_eval and instance_eval while understanding the differences.
  • See how knowing your singleton_class affects your understanding.
  • Know how yield, lambdas, procs, and blocks work.
  • Understand method_missing, respond_to_missing?, and how method lookup works.
  • Learn to control constant lookups and dynamic class and module creation.
  • And how all this fits together.

About Your Teacher

jim-gay-headshot-small 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:

Kim Le “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 powerful and I am now leading the automated test effort at my firm!” —Kim Le

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

Join the Ruby Metaprogramming Masterclass

Most training classes are hundreds or thousands of dollars where spending $800 is a great deal. This class self-paced and online, and you'll get the interactive class, videos, cheatsheets, exercises, and reusable source code for only $399 $129.

If at any time during the class you feel that you're not getting your money's worth, I'll give you your money back and you keep all the material, no questions asked.

The price is going up to $399 once the final course is complete with all videos and lessons. Get in now and get all the materials as they are added for only $129.