This post originated from an RSS feed registered with Ruby Buzz
by Red Handed.
Original Post: Painting The MetaTown Red
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
You can’t go anywhere without reading about metaprogramming in Ruby. I tried passing through a turnstyle on my way out of the arcade tonight and—boof—a whole blog on meta stuff was jammed right there!!
Oliver Steele, creator of Lazlo, just got done talking all admirably about Ruby’s meta. I agree. The ability to add to Class and use those methods like a definition—that’s the stuff railsers lick straight from the raw honeycomb. He compares some Ruby and Lazlo snips, which rules if you want a taste of Lazlo.
Okay, so, ready for some real metaprogramming code?? Aslak Hellesoy has offered a simple bit o’ annotations for attaching arbitrary metadata to a class. Perfect. Thank Curt Hibbs on your way out, he’s the one who floated this on to Ruby-Talk.