2 ms·
That's how Ruby meta-programming works, just as that's how inheritance works, just as that's how function calls work. They're mystifying at first, then you lea
by a4isms 5y ago
That's how Ruby meta-programming works, just as that's how inheritance works, just as that's how function calls work.
They're mystifying at first, then you learn how to use them without looking under the hood, then you learn exactly how they work, then you start making your own.
The word "trick" is associated with prestidigitation. Unless you're entering the Underhanded C context, these "tricks" are more like magicians showing EACH OTHER how to do things.
"Here's how to make flowers appear out of your top hat."
"Ah!"