5 Ruby Metaprogramming Methods to Simplify Your Code



Published May 2017

Let's get programming

Metaprogramming is one of Ruby’s coolest features.

You might think that this concept is complex and something only experienced developers apply. But this is not the case! A dash of metaprogramming can greatly simplify your code which allows you to write understandable and concise programs. In this mini course, we will discuss various aspects of metaprogramming and see demonstrations to watch it all in action.

Learn how to create automated Ruby tests with our Feature Tests with RSpec course. If you’re still learning Ruby, head on over to our Ruby course.

Oh yeah, and the whole SitePoint library! Learn More.

What you'll learn

  • Understand Ruby metaprogramming
  • Learn how to apply metaprogramming into your code
  • Closed captions available
Meet your instructor
Ilya Bodrov-Krukowski

Ilya is a lecturer at MATI-RSTU, senior engineer at Campaigner LLC and seasoned author at SitePoint. When Ilya is not working away on new projects or contributing to open source projects, he's expanding and refining his skills in HTML, CSS, jQuery, Angular, Backbone and Rails. You can read all about his work and development discoveries on his blog Radiant Wind.

Lesson 1: Ruby Metaprogramming Revealed
Elegant Coding Through Dynamic Methods and "method_missing" 10:20
Understanding Eigenclasses in Ruby and Realizing Their Importance 6:45
Learning About the Uses of Singleton Methods in Ruby 9:28
Discovering the Differences Between Blocks, Procs and Lambdas 11:50
Local Variable Scope in Ruby and How to Get Around It 8:52

Leave a Review